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.
Problem with script arguments
-
Hello,
I've encountered some weird behaviour using Pythonista and I'm not sure if I'm doing something wrong or it is a bug.
Recently I installed Django, following this great advice:
http://blog.peddals.com/en/install-setup-django-pythonista3/
Everything went ok until I tried to start the sample app.
I did a long press on the play button and I typed "runserver --noreload" as the args and I got this message:
CommandError: "-noreload" is not a valid port number or address:port pair.
Upon closer examination, it seems that the "-" characters are getting changed when I type them. Every two “-“ change into “—“.
I wasn't able to make it work until I copied and pasted the arguments from a script text.
I'm using an iPad Pro with the Spanish keyboard.
Has anyone encountered this problem?
Thanks
-
This comes from a new feature in iOS 11, called "smart punctuation". It changes some punctuation into nicer/more "correct" characters, for example it replaces "--" (two minuses) with "–" (an "em dash"), as you discovered. This is nice when writing normal text, but causes problems when writing code. You can turn this feature off in the iOS Settings app, under General > Keyboard. (If you have a hardware keyboard, you may also have to turn it off again under the "Hardware Keyboard" section.)
If this doesn't work, you can probably copy and paste the text from the instructions that you're following. The pasted text shouldn't be changed by any of the iOS text replacement features.
-
Thanks! I've just turned it off and it works like a charm. :)