Can’t import .pyui files?
I’ve been using my iPad Pro to write a script + UI and have Working Copy to save it into a Git repository and push to Bitbucket. Now I want to be able to use the script on my iPhone as well, which I believe won’t work simply by moving the Python files into my iCloud folder, so I figured I’d simply clone the repository with Working Copy on my iPhone and import the whole lot into Pythonista there.
The problem is that I can import the .py file happily, but the .pyui files are greyed out and won’t let me even select them?! I found this thread from four years ago with some hacky methods, but surely .pyui files should be able to be imported into Pythonista by now? Am I missing something obvious? :(
@VirtualWolf You can copy all your files in iCloud Drive/Pythonista3 and they will be accessible to all your iDevice where you enable iCloud Drive
Yeah, I can’t run them from there though, it complains about “Script not found” when I try to use it through the share extension. The only way seems to be to copy them into iCloud on my iPad, then manually move them from iCloud back into the iPhone, which means doing that same song and dance every time I make a change to it...
JonB last edited by
I believe if you create a folder inside of iCloud, you can run from there...
VirtualWolf last edited by VirtualWolf
Ok, tell me if I'm doing something stupid here. :) This the sequence of events:
- From the iPad, create a new folder inside Files in the "Pythonista 3" folder.
- Select the .py and .pyui files, click the wrench icon, choose Share > Save to Files, save it into the newly-created folder in Step 1. (Or simply move the files to within Pythonista's "iCloud" section under Script Library, I've tried both).
- On my iPhone, open Pythonista and under Script Library > iCloud, the new folder and .py/.pyui immediately show up.
- Set the newly-added script as a Share Extension script under Settings > Share Extension Shortcuts.
- Open Photos, choose Share > Run Pythonista Script, select my script, and I'm greeted with an error saying "Script Not Found: The script for this action could not be found. You may have moved or renamed it. Do you want to locate the File?"
Even if I choose "Locate" and reselect the script from my iCloud library, it gives the same error again.
I tried renaming both the .py and .pyui scripts to have no spaces or capital letters, that didn't work either, and the same whether they're in a subfolder or not.
Ahh, fantastic. I’ll just wait for it to arrive then. :) Cheers!