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.
Learn Python the Hard Way: ex13
-
Good evening,
I am currently trying to execute an 'argv' command similar to one found in exercise 13 of this book.
Currently, I am having issues with the syntax and am receiving 'invalid syntax' errors.
Is there anyone here that is familiar with this book as well as pythonista that could let me know if pythonista has limitations making it difficult to solve this exercise?
cc
-
You probably left out a comma somewhere or are you typing
$ Python ex13.py
to run it?. I tried the example and it worked perfectly. -
-
It might be worth noting that you can hold the run button for a second in order to pass arguments to it. This is different from how you'd usually do this on a desktop computer.
-
- Paste the text of the exercise into the Pythonista editor.
- Tap and hold the "run" button in the upper-right corner of the screen. The hold should last for a second or two.
- If you held the "run" button down long enough the a Run With Arguments text entry dialog will appear.
- Type "one two three" (with no commas) and tap Run.
- Rock and Roll...
-
Is there any way to reproduce this from the command line perspective?
If I'm following this book as a resource to help me learn python, is there any way for me to const the pythonista documentation and find out where exactly pythonista deviates from the regular desktop applications?
Cheers
Edit: thank you much omz and ccc for the FYI. I've got it to run. Spent roughly 5 hours trying to figure this one out xD
-
You could do so using Shellista but don't go there yet. Command lines are for the previous millennium.
Instead, just recognize that an iPad is not a desktop computer and that means you do things slightly differently on an iPad than on a desktop computer. Typing into a dialog box is not that hard.
-
"you can hold the run button for a second in order to pass arguments" ... does anyone else find this causes a crash? I've tested it on IPad mini (original) and iPhone 4, both from a clean startup of Pythonista... both crash immediately you click 'Run'
-
@ced Pythonista docs are available at http://omz-software.com/pythonista/docs or in the Pythonista app under the "?" icon at the upper right of the screen.
-
@ccc Thank you much for the help provided this weekend.
omz's applications are game changing!