Thanks! "Run Pythonista Script" and then "import" works.
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.
Posts made by lucas2301
-
RE: Import binary files into Pythonista workspace
-
RE: Import binary files into Pythonista workspace
That works once I have the file inside the Pythonista container. However, Pythonista seems to only allow import of certain kinds of file extensions into the container. Files with zip extension for example are blocked.
I found a workaround: From Files app, import the .zip file into Working Copy. In Working Copy, rename the file extension to .txt, then share from Working Copy into Pythonista iCloud Folder. Now just read the "text" file with open("foo.txt", "rb") and interpret in binary mode.
But why not allow import of arbitrary files in the first place?
-
Import binary files into Pythonista workspace
I have several of binary files in my iCloud Drive that I want to analyze with Python(ista). Using either the Files app, or Pythonista's import dialog, I can import many types of files into my Pythonista workspace, for example, .txt, image files and PDF files.
However, importing .zip files or .sqlite3 database files (or many other binary file types) does not work for me.
Any advice for how I can process arbitrary files with Pythonista?