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.
Open python files from Dropbox
-
Can Pythonista open python files from Dropbox?
I am mostly only interested in Editorial, and have some basic Python scripts running there, but I'd like to do a lot more. Currently my workflow is to write the script in a text file on Windows in an IDE, saved in a Dropbox folder. I then have to open the file in Editorial and copy the code from the text file to the Editorial template builder action. This has already become very tiresome. I can't see any other way to do it, and Editorial specifically refuses to open .py files directly.
So I'm thinking (hoping) that if Pythonista can open .py files directly from Dropbox, it may be a much quicker workflow to get stuff running, and then when they are, I can paste the final code into the Editorial template.
(All my stuff so far was built using the Pythonista documentation, so for what I want to do, they seem to run the code the same way)
But there is nothing anywhere about how/where Pythonista stores it's files, and any search for Pythonista+Dropbox yields results that have nothing to do with simply saving/syncing the source .py files. Neither the website nor iTunes mention saving/loading your scripts to/from Dropbox.
I don't want to spend $15 unless I know this is going to solve my problem, but OTOH I'm happy to support the developer if it will, even though I'd be spending double again what I've already spent :)
-
@CascadeHush Hi, Pythonista (and similar iphone apps, maybe this limit is for all platforms like win, linux, mac, etc...) needs to download your scripts inside its read-write folders in order to run them.
No way I know that allows you to run your python scripts saved in dropbox remotely, because dropbox has not a remote python environment/core.
But I know that with Pythonista (and I think also with Editorial, because the app uses Python as programming language) you could:
- Save a dropbox link into clipboard with your idevice (your script or a zipped folder with many scripts inside),
- Run a script with Pythonista that downloads, inside any Pythonista read-write folder, the file or the zipped folder with the related dropbox link, and this script can be easly run with Today Widget feature for example, that is without open Pythonista app itself,
- Run/modify your script or unzipped zipped folder inside Pythonista env,
- Select the same script or zip the folder, for example with a wrench script for Pythonista,
- Select the single script or the zipped folder created with the wrench script and share it selecting Save to Dropbox, if you have Dropbox app installed in your idevice.
Now you can work on your python scripts with computer downloading the modified scripts from your dropbox.
Bye
-
Maybe I haven't communicated effectively.
Can Pythonista open .py files from Dropbox the way editorial opens text files from Dropbox?
I'm not working on complex multi-file projects, just converting relatively simple workflows from the Workflow app to Python.
Otherwise, the workflow you explained seems no simpler than what I'm already doing in Editorial.
-
@CascadeHush Hi, ok now I understand. I don't know Editorial but I suppose that this app, automatically when launched by user, links to dropbox folder and allow you to edit any txt file by downloading it in a local folder and, after your modification, it reloads/synchronizes the modified script into dropbox instantly.
I think that Pythonista has not the feature with py files you have with Editorial with txt files, but I'm not sure.
Of course I find more convenient to use, with Pythonista, some scripts created by Pythonista users in this forum that allow to download/upload any zipped folder or any single python script from/to dropbox than to copy the entire text of a script saved in dropbox and to paste the text in a new file created with the App.
In my previous post, point 1. must be performed by user using Safari or dropbox app for idevice (to copy dropbox link into idevice clipboard), point 2. could be executed automatically with two touches on idevice screen, point 3. must be performed by user (if you want to run/modify the downloaded scripts) , point 4. should be performed by user (that is the selection of the file or the folder to be zipped with Pythonista file manager), point 5. must be performed by user touching the Share key in Pythonista environment and selecting 'save to dropbox' action.
Sorry if this procedure seems poorly automated, but for now, with the restrictions by Apple about idevice Apps, I don't know a better/easier way to interact quickly with dropbox.
Some powerfull scripts written by users here allow you to sync Pythonista with your dropbox, but in order to have, always, an updated local Pythonista dropbox folder, you should always launch the sync script every time you open Pythonista app (you could obtain this by creating a pythonista_startup.py script that is executed every time you launch the app, it doesn't work always properly, anyway, but it is a powerful feature).
Bye -
Thanks. That's helpful. I'll see how I go with just Editorial for now. When I want to start working on stuff outside of that, I'll think about my next steps. I can continue to use Workflow for some stuff and Editorial for the rest.