Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
A Working Directory in Xcode
-
Firstly. Pythonista: what a fantastic app!
And now the new Xcode template for version 3 is superb too... but I am struggling to write persistent text files from my Pythonista3 code when in Xcode simulator or when I test it after building it onto an attached (iPad) device.
In PY3 the code works as I would expect - writing .txt files to the same location as the code, which persist for reading back in after PY3 is closed and reopened. But from Xcode the files read OK but apparently do not write/update (no error is reported). When the Xcode test app on the iPad is reopened the text file does not reflect the earlier .write() changes either
I am wondering if it is to do with having no working directory option in Xcode:Edit Scheme:Options which I see in other Xcode examples
Any help much appreciated.
Alan
-
I solved it. Create a folder in the same location as the script. Write the files into that. Works in Pythonista and more importantly in apps (USB installed) as a test from Xcode.