kojack
Apr 11, 2014 - 23:31
Is there a way to pass parameters to a script? In other words, if I have a script that connects to a site entered by the user is there a way for me to enter the target site in Pythonista?
Is there a way to pass parameters to a script? In other words, if I have a script that connects to a site entered by the user is there a way for me to enter the target site in Pythonista?
Press and hold the 'run' button for an extra second or two and you will be asked for sys.args.
Nice trick, didn't know that one yet.
If you want to you can also use the console module to show an input prompt, or the clipboard module to use a URL from the clipboard, or both.
Awesome! Thanks for the replies