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.
appex loads code from icloud
-
As far as I understand it is not possible to run an appex that lives inside the icloud folder. So I came to the idea of having a tiny appex wrapper script local that loads the main program from the icloud folder. The following code kinda works (not really):
sys.path.append('/privat/var/mobile/Library/Mobile Documents/iCloud~com~omz~software~Pythonista3')
from Documents import TheMainCode
TheMainCode.doSomething()But it has some nasty side effects. For example changing anything in the icloud file only has effect on the iOS device after a complete restart. And some variables seem to survive subsequent calls. Can someone please help me to understand what's happening here and if there is a working way of programmatically importing code from icloud?
-
@oliep if via share/Pythonista3/edit scripts you don't receive this
It will appear in next version (I've the beta, thus no more able to test App Store version)
-
-
@oliep If you want to share text to a Pythonista script, even on iCloud, you could write a shortcut in the IOS Shortcuts app which will be shared and will receive as "Shortcut input" the shared text.
Your shortcut could then open url pythonista://your script.py?action=run&root=icloud&args=ShortcutInput Magic variable.See shortcut
Of course, instead of sharing to Pythonista, you will have to share to your shortcut.
That's while waiting for the new version of Pythonista. -
@cvp Perfect! Thanks a lot!
-
@oliep sadly, this solution does not work for a file sharing, only for text sharing
-
@cvp Oh yeah. I've just figured that. To bad. The bug/missing feature in workflow is already a year old. Bummer. Let's hope for the best.
-
-
The beta signup link is
https://testflight.apple.com/join/qDkBu2ur