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.
Accessing files elsewhere on iPad
-
I have a set of jpg files that I have uploaded into a folder on my iPad. I can see the folder in the External files list, and I can see the content of the folder when I select that folder.
I want to open the files individually within a Python script, so that I can display specific images under interactive control.
How do I create the full file path for each file to allow me to open it in my script?
I am reasonably familiar with Linux and have used Python on Ubuntu, for example. So I am expecting to be able to construct a path to the directory where my jpg files are.
I tried using the os package to navigate on the console, but when I tried to navigate up from the ".../Pythonista3" directory, I got an "Operation not permitted" error. Does iOS prevent accessing directories outside Pythonista's own directories?
Thanks in advance! -
@rwms said
How do I create the full file path for each file to allow me to open it in my script?
Create in the folder that you want to access a little .py file with
import editor print(editor.get_path())
Run it and it will print this full path
-
Thanks. This works perfectly!