Pythonista-Issues icon indicating copy to clipboard operation
Pythonista-Issues copied to clipboard

input in shortcuts app is no longer available in sys.argv in iOS 13

Open glyph opened this issue 5 years ago • 3 comments

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?

glyph avatar Oct 19 '19 07:10 glyph

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...)

dgelessus avatar Oct 19 '19 11:10 dgelessus

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?

aihimmel avatar Dec 06 '19 20:12 aihimmel

The Run Script was working in the beta but that has since expired.

Harwood avatar Feb 05 '20 20:02 Harwood