app.pathsattribute; that gives a number of operating-system level paths for storing files. As for “how” - you can use any normal Python file system operations.
... hey, wouldn't this be the perfect use case for Python 3.8's assignment expressions?
In : 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
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'
pip install -U --pre togawill fix it in your local environment.
runbutton in Pycharm
I've worked with pyinstaller + pyqt before and wanted to give beeware/toga/briefcase a shot and worked through the beeware tutorial yesterday. I did manage to build the tutorial app on Linux Mint 19.3 with
briefcase 0.3.0 eventually but the
briefcase create and
briefcase build steps were not smooth at all. The rest is really well written though.
I first tried option 3 (using docker as instructed) but was facing the issue that
briefcase build was bailing out because the linuxdeploy AppImage was seemingly not executable inside a docker container (not a permission problem, and known to the linuxdeploy team).
Then I tried option 4 (building the support package using docker). It worked but it was not obvious from the docs what to do with the build output. Found an issue which hinted at copying stuff into the project folder. Felt very hackish and could not find docs mentioning how to cleanly integrate custom build support packages.
Then I found a message from @freakboy3742 mentioning that in the git master docker is called in the background when using briefcase on linux. Sounded like a nice idea and tried it out. Unfortunately it bailed out on me almost at the very end of the
briefcase create call when adding the user:
Step 12/16 : ARG HOST_UID ---> Running in 063a424d6a86 Removing intermediate container 063a424d6a86 ---> 4657e96c180d Step 13/16 : ARG HOST_GID ---> Running in a59336d3cdb7 Removing intermediate container a59336d3cdb7 ---> 4fede95af7ee Step 14/16 : RUN groupadd --gid $HOST_GID briefcase || true ---> Running in bb37131e7a73 groupadd: GID '0' already exists Removing intermediate container bb37131e7a73 ---> a94d6f409c76 Step 15/16 : RUN useradd --uid $HOST_UID --gid $HOST_GID brutus --home /home/brutus ---> Running in 55dc8b2957d8 useradd: UID 0 is not unique The command '/bin/sh -c useradd --uid $HOST_UID --gid $HOST_GID brutus --home /home/brutus' returned a non-zero code: 4 Error building Docker container for helloworld.
Is that feature known to be broken or can I do anything to debug this?