by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Tom
    @tomthedankmemer_twitter
    ive already been through tutorial 0 and 1 countless of times, and i always lose it on tutorial 2
    Russell Keith-Magee
    @freakboy3742
    And again: Toga tutorial 2 or Beeware tutorial 2?
    Tom
    @tomthedankmemer_twitter

    And I mean the entire tutorial. Not “I did step one and then I decided to do something on my own”.

    i dont even know the basics, how could i wander off

    And again: Toga tutorial 2 or Beeware tutorial 2?

    beeware

    Russell Keith-Magee
    @freakboy3742
    Ok - Now we’re getting somewhere.
    Let me guess. You get to the “Adding some content on our own” section, you replace the content, and the app stops working?
    Tom
    @tomthedankmemer_twitter
    Not really
    it does work fine, but i dont understand what im doing
    Russell Keith-Magee
    @freakboy3742
    Ok - so… what part is confusing? You defined a label, a textinput and a button; and the GUI contains a label, a text input, and a button. The label and the textinput are in a “row” box - so they appear in the same row. The row box and the button are in a column box, so they appear above each other.
    This is the same as:
    <div> 
       <div>
          <p>Your Name</p>
          <input />
       </div>
       <button>Say Hello</buttion>
    </div>
    (with appropriate CSS styling)
    Tom
    @tomthedankmemer_twitter
    oh well, speaking of css, dont know any
    Tom
    @t-arn
    @freakboy3742 I would like to write iOS apps with Python, but I don't want to buy a Mac. I know that it is possible to write Xamarin iOS apps on a Windows PC and build therm
    ...build them in the cloud, e.g. with appcenter.ms You only need a Mac once when you upload the app the first time to AppStore or TestFlight. Snx
    And this one time, you can use MacInCloud. Is this also possible with BeeWare
    Tom
    @t-arn
    ...I mean, is it possible to create an iOS Python app on Windows and build it in the cloud with BeeWare?
    Russell Keith-Magee
    @freakboy3742
    @t-arn Sure - Github Actions, for example, ships with an Xcode install, so you could use Briefcase in a CI environment to generate and build an iOS binary. Briefcase can’t currently automate the process of pushing that binary to the App Store, but that’s something that we want to add.
    Tom
    @t-arn
    Do you know if it works with other cloud services as well? I prefer BitBucket or appcenter.ms. And how do you get Briefcase into those cloud services? Does it only work for cloud services that support BeeWare explicitly?
    Russell Keith-Magee
    @freakboy3742
    So, you’ll need a CI service that provides Mac hosting. Github actions does; Travis CI does; azure cloud does; can’t speak to any others.
    As for “briefcase support” - it’s a pip installable package, so as long as you can set up a Python environment and pip install briefcase, you’re set.
    Anushka Trivedi
    @opheliagame
    Hey I'm trying to build an app and I need to access app data for it. I see that there is a resources module inside the app module. Should I keep the files inside that, and then how should I access them?
    @freakboy3742 would it make sense to use tensorflow, keras as dependencies of the app and then making an android version?
    MarkoTammeorg
    @MarkoTammeorg
    Hi,
    MarkoTammeorg
    @MarkoTammeorg
    Hi, I need some help with an issue. I'm trying to package a binary on Linux using docker. I manage to run the command "docker run - it - v..." and then then install the rest of the necessary requirements but then after I try to create a briefcase I get an ERROR : Could not find dependency:libcrypto. So. 1.0.0
    MarkoTammeorg
    @MarkoTammeorg
    I should have mentioned, I'm working on Ubuntu 20.04
    Tom
    @t-arn
    @freakboy3742 Thank you! Wouldn't that be a good subject for a tutorial? :-)
    Russell Keith-Magee
    @freakboy3742
    @opheliagame The Resources folder is a convenient location; but you can use any file location you want. If you want to store user configuration, cache or log files, you might want to use the app.paths attribute; that gives a number of operating-system level paths for storing files. As for “how” - you can use any normal Python file system operations.
    @opheliagame I’d be very hesitant to recommend any package with binary modules for mobile distribution at this point. It’s certainly possible to get them to work, but it’s not simple - you need to know a lot about Android tooling. You definitely can’t “just pip install” something like Keras or Tensorflow.
    @MarkoTammeorg If you’re seeing that error, it means there’s some discrepancy between your build environment and the support package. We’ve seen a lot of that on Linux; and so, we’ve recently modified the Linux build to internally use Docker by default.
    It will be in the 0.3.1 release; but if you install from Github, you can get those features right now. It manages docker in the background, so as an end developer you only need to run “briefcase build” etc.
    Russell Keith-Magee
    @freakboy3742
    @t-arn Completely agreed! Are you volunteering :-)
    In all seriousness - it’s on our list; we’ve just got a lot of stuff on that list :-)
    Russell Keith-Magee
    @freakboy3742
    @t-arn And beeware/briefcase#400 logs it as a feature request
    Russell Keith-Magee
    @freakboy3742
    Hey folks: there’s an ongoing discussion about a possible API to retrieve elements in a Toga GUI by ID: beeware/toga#930 - if that sounds like something you might have opinions about, we’d love to hear them.
    dgelessus
    @dgelessus

    ... hey, wouldn't this be the perfect use case for Python 3.8's assignment expressions?

    In [5]: self.content = Box( 
       ...:     children=[ 
       ...:         (self.sub_box := Box()), 
       ...:     ], 
       ...: )                                                                                           
      File "<ipython-input-5-f6395d37c8f1>", line 3
        (self.sub_box := Box()),
         ^
    SyntaxError: cannot use assignment expressions with attribute

    ... oh.

    Russell Keith-Magee
    @freakboy3742
    awww… :-(
    Tollis Hunt
    @MrSassyBritches

    aight folks, i used the briefcase tool to bootstrap my and this was generated

    My first application
    """
    import toga
    from toga.style import Pack
    from toga.style.pack import COLUMN, ROW
    
    
    class ControlPanel(toga.App):
        def startup(self):
            """
            Construct and show the Toga application.
    
            Usually, you would add your application to a main content box.
            We then create a main window (with a name matching the app), and
            show the main window.
            """
            main_box = toga.Box()
    
            self.main_window = toga.MainWindow(title=self.formal_name)
            self.main_window.content = main_box
            self.main_window.show()

    But its telling me there is no module toga.style
    ModuleNotFoundError: No module named 'toga.style'

    Russell Keith-Magee
    @freakboy3742
    @MrSassyBritches Ok - the code you’re showing is for Toga 0.3 (which is what briefcase uses by default); however, the “no module named toga.style” error means your environment has Toga 0.2
    Tollis Hunt
    @MrSassyBritches
    oh boy
    alright let me do some sluething
    Russell Keith-Magee
    @freakboy3742
    This usually means you’ve either manually installed Toga and not provided the --pre argument, or you haven’t specified a explicit version of toga in your requirements.
    Usually, pip install -U --pre toga will fix it in your local environment.
    Tollis Hunt
    @MrSassyBritches
    im using pycharm so would i be looking for this one specifically?
    image.png
    Russell Keith-Magee
    @freakboy3742
    No - dev19 is the most recent version.
    Tollis Hunt
    @MrSassyBritches
    ha the sorting is messed up in this
    thanks
    Tollis Hunt
    @MrSassyBritches
    what does it mean to need a formal name i checked the the toml file, it has one.
    Russell Keith-Magee
    @freakboy3742
    Well, the short answer is that “you need a formal name” - but it’s impossible to clarify more without knowing what you’re doing - e.g., which tutorial you’re following.
    Based on the errors you’re getting, you’re not doing the Briefcase tutorial or the Toga tutorial - so… what instructions are you following?