omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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.


    Trouble Setting Default Version in Pythonista 3

    Pythonista
    3
    6
    4367
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jimwims
      jimwims last edited by

      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

      1 Reply Last reply Reply Quote 0
      • cvp
        cvp last edited by

        See settings icon at bottom right of Pythonista window...

        1 Reply Last reply Reply Quote 0
        • cvp
          cvp last edited by cvp

          Or

          #!python2
          NOT #1python2
          
          jimwims 1 Reply Last reply Reply Quote 0
          • jimwims
            jimwims @cvp last edited by

            @cvp Great!! Thanks for your help.

            Jim

            1 Reply Last reply Reply Quote 0
            • ccc
              ccc last edited by

              https://en.m.wikipedia.org/wiki/Shebang_(Unix) for the full history of "shebang" lines.

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp last edited by cvp

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

                See topic here

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors