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.
XCode Project - what are the limitations/possibilities?
-
Hi
I had used Pythonista really as just a place to muck about with Python scripts on my iPhone until I caught the 1.5 announcement on reddit. The ui module & numpy being included to name two are blowing my mind. The capability and possibility to make native ios apps in Python is such a long held dream.
What I am trying to ascertain today is this: in the xcode project that ole linked to: http://omz-software.com/pythonista/download/PythonistaProjectTemplate.zip there is one python script 'Script.py'.
This might seem like a stupid question but are you limited to one python module? Or can you link to others. I'm not talking about what is bundled in Pythonista like the standard library, numpy, requests etc. I'm talking about a project structure where I have a number of python modules that I import in to a main 'Script.py'. An additional related question then would be is it possible to copy in packages to xcode ? I've used the pipista script in the app but what use is that if you can't export those other packages you gain access to into the xcode project?
So in summary: I want to be able to, from 'Script.py', do import fromsomeotherdotpymoduleinthesamefolder and also be able to copy in pure python packages i've maybe pip installed into a virtualenv on my mac? Can this be done?
Maybe I'm being stupid anyway? Is there even a way to import from another module in Pythonista in the app?
-
I found the answer to the module issue here
https://omz-forums.appspot.com/pythonista/post/5882075823472640
You copy modules into 'pylib' in finder (which appears as "Support Files/pylib" in xcode
How would I include a data file? Say .json, .dat