Pythonista-Issues
Pythonista-Issues copied to clipboard
input in shortcuts app is no longer available in sys.argv in iOS 13
On iOS 12, I had a shortcut that would invoke Pythonista with some input. The input was available in sys.argv[1]
. I haven't changed the shortcut, but now, I can't seem to find the input anywhere. Is it still provided via some other API?
Passing arguments from Shortcuts with the "Run Script" action is currently broken. As a workaround you can use the "Open URL" action and manually construct the Pythonista URL (including arguments). See this forum thread
I'm a bit surprised that passing arguments with the standard action has ever worked for you. It was broken even back when Shortcuts was called Workflow, so I always used the "Open URL" solution. There's even a forum thread from five years ago (when Workflow first came out) where one of the Workflow devs suggested the URL workaround until the issue was fixed. (Maybe the fix was implemented at some point and I simply didn't notice...)
This was working relatively recently and then stopped with iOS 13. See:
https://forum.omz-software.com/topic/5860/sending-arguments-from-shortcuts-to-pythonista-not-working
Are there plans to fix it?
The Run Script
was working in the beta but that has since expired.