In Pythonista my app resides in its own folder ("Book Notes"). While doing the initial testing, of course, the initial working directory when running the app was always the same, since I was always starting up from the same .py file.
Now that I’ve saved my app to the home screen, it seems to sometimes start up with the initial working directory set to the folder the app’s main file is in; and sometimes with the initial working directory set to Pythonista’s Documents folder (Pythonista3/Documents).
So what I do currently is check to see if the current working directory ends in "/Book Notes", and if it does not, using os.chdir to change into "/Book Notes".
Is there something else I should be doing to ensure a consistent initial working directory?