by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Russell Keith-Magee
    @freakboy3742
    And the beeware Tutorial isn't far off either.
    Tom
    @tomthedankmemer_twitter
    when i overwrite the code from the first part of tutorial one on app.py it doesnt even run
    i dont know how to change it into briefcase format
    Russell Keith-Magee
    @freakboy3742
    First off: Is this toga tutorial 1 or the beeware tutorial 1?
    Tom
    @tomthedankmemer_twitter
    toga tutorial 0
    Russell Keith-Magee
    @freakboy3742
    Ok - and the tutorial works, but you can’t adapt it to briefcase?
    Tom
    @tomthedankmemer_twitter
    i dont know how to adapt it to my pregenerated briefcase app.py code
    Russell Keith-Magee
    @freakboy3742
    Ok; if you want to see a working example of tutorial 0 as a briefcase project; the Toga codebase has that code
    Tom
    @tomthedankmemer_twitter
    alright, that works!
    so, i had a question in my mind
    how does app.py read the code
    from top down?
    i dont quite get it
    what is the path that it takes, and how can i manipulate that to put widgets inside boxes etc
    keep in mind im kind of a rookie in object oriented
    Russell Keith-Magee
    @freakboy3742
    I don’t understand what you mean by “the path it takes”.
    Tom
    @tomthedankmemer_twitter
    which code gets read first etc
    i can only see a main() function getting executed, but i dont know what code it reffers to
    Russell Keith-Magee
    @freakboy3742
    Ok - I’m really having difficulty understanding where the source of confusion is. app.py isn’t that big. It defines a “build” method that creates a box and puts a button in that box. And the GUI appears with a button.
    Where in the process are you getting lost?
    Tom
    @tomthedankmemer_twitter
    first of all, i see many functions getting defined,
    but i cant understand how they get executed
    secondly, in my mind, im only familiar with the concept of html when building a gui, in which you literally put <stuff><stuff> within other <things>(Here)</things>
    Russell Keith-Magee
    @freakboy3742
    Right - and the same thing is happening here. You don’t control how the app “runs” - the build method in this example is your “HTML” document.
    And the layout is very closely aligned with HTML. If you get to the next tutorial, it’s called “you put a box inside another box” - which is literally what HTML is.
    Sorry - tutorial 2.
    Tom
    @tomthedankmemer_twitter
    hmm ok so
    Russell Keith-Magee
    @freakboy3742
    So all you’re describing are the widgets you want on the screen - the buttons, text inputs etc - and putting them in boxes that relate to one another.
    Tom
    @tomthedankmemer_twitter
    what does "return box" do inside the function
    Russell Keith-Magee
    @freakboy3742
    Ok - you really need to do all the tutorial.
    That gets explained along the tutorial path.
    Tom
    @tomthedankmemer_twitter
    will the code work with briefcase though?
    Russell Keith-Magee
    @freakboy3742
    Tutorial 0 is a simple example. It defines a single function (build) that… builds… the GUI.
    Why does that matter?
    Briefcase is a packaging tool.
    You’re not up to packaging yet.
    You’re still building the app.
    Tom
    @tomthedankmemer_twitter
    wait, so do i use toga instead?
    im confused
    Russell Keith-Magee
    @freakboy3742
    Ok - so your question like asking “do I use this hammer to bake this cake”. No - you use the hammer to hammer the nail. You bake the cake by baking a cake.
    Lets step back.
    How did you find out about BeeWare?
    Because it seems like you’ve got the end of half a dozen threads, and you’ve missed the actual narrative about how the pieces all fit together.
    Tom
    @tomthedankmemer_twitter
    i was looking for a way to add gui to a python program that also is cross platform, i then realised that android is, for the time being, not supported but is going to be in the future, so i preffered beeware from the other alternatives because of the native support
    Russell Keith-Magee
    @freakboy3742
    Ok - that’s not what I asked.
    How did you find out about BeeWare? WHY is beeware on your radar?
    I’m trying to find out where the knowledge gap is.
    Someone has clearly told you something about BeeWare, but they’ve either done a bad job, or an incomplete job.
    (And that person might be me/us - I’m just trying to work out where you’ve gone off the rails)
    BeeWare is an umbrella project. It’s a collection of smaller, independent projects aimed at the broad goal of building GUI apps with Python.
    That involves a bunch of things. It means “how do I get Python to run on my device” (when your device isn’t a laptop). It involves “How do I talk to the system libraries on my device”. It means “How do I put a window and a button on the screen”. And it means “how do I take this collection of code and package it in a way I can give it to someone else."
    Those subprojects are, respectively “Python-*-support”, “Rubicon”, “Toga”, and “Briefcase”.