Trouble Setting Default Version in Pythonista 3
-
I have written a few simple scripts in Pythonista (original) which I use frequently on my IPhone 5s running iOS 9.3.2.. I have just upgraded to Pythonista 3 and want to set the default version to 2.7. The documentation says this can be done in the settings. I assume this refers to the Apple settings app, but Python 3 does not show up there. (Pythonista did.) I have also tried using the shebang method described in the documentation by adding "#1 python2" (but no quotes) as the first line to the scripts. When I try to running the scrips, I get formatting error messages. Do anyone have any suggestions of where I may have gone astray? (All is not lost -- the scripts do run using the tap and hold the run button and select 2.7 method.)
Jim
-
See settings icon at bottom right of Pythonista window...
-
Or
#!python2 NOT #1python2
-
@cvp Great!! Thanks for your help.
Jim
-
https://en.m.wikipedia.org/wiki/Shebang_(Unix) for the full history of "shebang" lines.
-
@jimwims Don't believe I'm an expert, I''m only a beginner but I've had the same problem some days ago and @JonB did explain me both ways to solve it.