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.


    Python 3.x Progress Update

    Pythonista
    56
    395
    526459
    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.
    • omz
      omz last edited by

      @Webmaster4o It'll technically be similar to how files are shared between the main app and the extension now. All documents already live in an "app group" folder that can be shared between multiple apps (you may have seen that the absolute paths of your documents contain "AppGroup").

      So basically, if you have both versions installed, you'll see a "Pythonista 2" folder in Pythonista 3, and a "Pythonista 3" folder in Pythonista 2. That's my current plan anyway.

      1 Reply Last reply Reply Quote 3
      • Webmaster4o
        Webmaster4o last edited by

        I really need to get some more iTunes gift cards. On my list of apps to buy include Textastic both for iPhone and iPad, as well as Codea, and now Pythonista 3 😂

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

          This is GREAT, I plan to buy the new Pythonista as well!!!! and join the Beta program

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

            @omz Great news!! I look forward to moving as quickly as possible to Python 3 only. Pythonista was the last thing keeping me on Python 2. I run the Anaconda Python 3.5.1 distro on my Mac and just love it. It will be fun to unify on Python 3 on all platforms. I look forward to the beta program and to buying Pythonista 3 as soon as it is available. Congratulations!!!

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

              Great news!

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

                This is great news!

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

                  That's awesome! I'll definitely get that version as well, as I'll just switch to it asap :P

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

                    Great news @omz, can you share a link for beta signup?

                    1 Reply Last reply Reply Quote 0
                    • dgelessus
                      dgelessus @omz last edited by dgelessus

                      @lukaskollmer

                      @omz said:

                      I expect that I'll have the first beta ready within the next week or so, hopefully without some of the limitations I've listed above. I'll post a new beta signup form here when I'm ready.

                      1 Reply Last reply Reply Quote 2
                      • Tizzy
                        Tizzy last edited by

                        Awesome. Now I'm going to have to change

                         print "something"
                        

                        statements in my scripts for months to come as I run them only to find my lazy ass didn't use

                        print("something")
                        

                        But seriously I'm glad Pythonista is moving forward as it's probably for the best. Now when will OS X ship with Python 3 out of the box???

                        Also @ccc any reason in particular you use this Anaconda distribution? Is that what you would recommend for everyone on OS X?

                        Webmaster4o 1 Reply Last reply Reply Quote 1
                        • omz
                          omz last edited by

                          @Tizzy

                          Awesome. Now I'm going to have to change print "something" statements in my scripts for months to come as I run them only to find my lazy ass didn't use print("something")

                          There will be some way to automate this.

                          1 Reply Last reply Reply Quote 2
                          • dgelessus
                            dgelessus last edited by

                            There's this thing called lib2to3, I hear it's part of the Python standard library. Perhaps that might be useful. ;)

                            @omz Maybe putting a lib2to3 thing in the action menu would be useful? Like the "Convert Indentation" option, except that it runs 2to3 on the file. Would probably be good to save the output to a different filename though, lib2to3 isn't perfect and doesn't always produce code that can run on Python 3 right away.

                            1 Reply Last reply Reply Quote 0
                            • Webmaster4o
                              Webmaster4o @Tizzy last edited by

                              @Tizzy -

                              @omz said

                              It will be possible to access files in Pythonista 2.x from 3.x though (and vice-versa).

                              He said in more detail on twitter that there would likely be a folder in the file browser for the 3.x version which simply displayed all of the files from the 2.x version. I suggested on Twitter that a dialog could be displayed for importing files from the 2.x folder, which would contain an option to automatically run the 2to3 program on the files imported. We'll see if that's something @omz chooses to implement.

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

                                @dgelessus said:

                                @omz Maybe putting a lib2to3 thing in the action menu would be useful? Like the "Convert Indentation" option, except that it runs 2to3 on the file. Would probably be good to save the output to a different filename though, lib2to3 isn't perfect and doesn't always produce code that can run on Python 3 right away.

                                Yes, I've implemented pretty much exactly that. Right now, it doesn't make a backup, but the changes are undo-able, and it shows a diff before applying them.

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

                                  any reason in particular you use this Anaconda distribution?

                                  http://docs.continuum.io/anaconda/pkg-docs lists all the superpowers that Anaconda adds to Python for free. 150 pre-tested, pre-configured modules. Just the IPython/Jupyter function alone is super cool but there is soooo much more in Anaconda.

                                  Is that what you would recommend for everyone on OS X?

                                  Mac OS X, Windoze, Linux. Yes!

                                  Webmaster4o 1 Reply Last reply Reply Quote 1
                                  • wnMark
                                    wnMark last edited by

                                    Great news!
                                    Sure I will buy and will be available as beta tester!

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

                                      @ccc does the conda utility include fewer packages than pip, or do they both scan the same index ?

                                      ywangd 1 Reply Last reply Reply Quote 0
                                      • ywangd
                                        ywangd @Webmaster4o last edited by

                                        @Webmaster4o You can use pip with anaconda. I use conda for updating packaged stuff and pip for anything that is not included by default. pip list shows packages installed by both command.

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

                                          Correct. http://conda.pydata.org/docs/using/pkgs.html#install-non-conda-packages

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

                                            Given that we are going to need to make the transition to Python 3, could I make a few feature requests for the next version of Pythonista 2 to get us started on converting our own scripts?

                                            • Pythonista settings already has a 'Use "true" division' switch but that only applies to the console and not to scripts. Would it be possible to add another switch(s) that would be the equivalent of adding the line: from __future__ import absolute_import, division, print_function, unicode_literals to the top of every script systemwide? See: http://python-future.org
                                            • In type ahead, could we remove print but keep print()?
                                            • While we are at it, would it be possible to add a shebang line to the Python new file template to ease the migration of our scripts to non-Pythonista platforms? This would make new Python files begin with #!/usr/bin/env python\n# coding: utf-8\n\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\n
                                            1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors