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.


    Pythonista for Python 3.x.

    Pythonista
    40
    99
    203891
    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.
    • wradcliffe
      wradcliffe last edited by

      @Phuket2 - I certainly would love to have the ability to run either Python 2 or Python 3 code in Pythonista and think it would suck to have it as two seperate Apps. That would mean two seperate Document areas and lots of problems with shared code, etc.

      It turns out that it IS technically feasible to use dynamic libraries on IOS but only as a developer. You have to be able to sign these components and bundle them and Apple will not do that. However as a "developer" you can do it with the available XCode tools. This makes me wonder if there would be a way to accomplish this if the user is also an Apple developer and capable of signing components from a desktop machine. This would certainly limit the market to people willing to pay the $100 to get a developer liscense, but most of users who desire 3.x support seem more then willing to pay that. You would also need to have a Mac desktop or laptop to sign and install the app. Just thinkin :-)

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

        This makes me wonder if there would be a way to accomplish this if the user is also an Apple developer and capable of signing components from a desktop machine.

        That's probably not possible, at least not without jailbreak – I would guess that all components of an app have to be signed by the same developer (or Apple).

        Aside from that, bundling multiple Python versions might be a possibility on iOS 8 via dynamic frameworks (the same mechanism that Apple recommends for sharing code between apps and extensions). I haven't tried this at all, and frankly, it's unlikely that I'll get to it in the near future, but the way I imagine this could work would be by bundling two different frameworks and loading one or the other on startup, depending on a user setting. This would almost certainly require restarting the app to switch interpreters, but since it's not something that you're likely to do often, I think that would be acceptable... Again, this isn't something I'm actively working on, but it could theoretically be a way to avoid having multiple apps in the future.

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

          @omz - I found this detailed article by a developer who was trying to find a way to implement plugins on iOS. He got it all working and found out that the only thing preventing it in production is Apple not being "able/willing" to code sign it. Have a look: http://realmacsoftware.com/blog/dynamic-linking

          It is also worth noting that the developer thinks this a major issue that is holding back the iOS platform.

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

            @wradcliffe, sorry for the delayed response. But I won't reply regarding your comments :) is over my head at this stage. I am too new to have any valid reply. As a newbie and wanting to learn Python on iOS got me searching here. Just see there are different syntaxs etc between 2 and 3. Just thought it would be more prudent for me to start on py3 giving I am just starting out. It from the little I have put together so far about what's available, I will certainly stick with Pythonista. As I said while I am not new to programming, it's just a long time ago. So many things have changed, and I find it is still a steep learning curve. Even though it's just a hobby for me, I still want to write Python properly. I see so many references to how easy Python is to learn, and to a degree, I agree. But when you take everything into account, regarding IDE's, all the different modules that can give you similar functionality etc... It's a little mind boggling. But fun. Ok, sorry I digresed!
            Bottom line, would still love to see py3 in Pythonista, but it's not the end of the world if not. I am using PyCharm on my Mac, can switch between the 2 project by project as far as I can see.
            @omz , really love your product. So stable and fast. I am on a iPad air 2. More stable a better than a lot of the other Mac Python apps I have used on the mac, with the exception of PyCharm (yes big cost difference also) I really wish you would consider a donate (PayPal) on your site. In all honestly, I think your product is too cheap. Thanks for a great product

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

              @omz, thanks for all of the hard work on Pythonista. I'm currently using it to work through an edX course (MITx 6001x), which uses 2.7.x for their examples, and it works great!

              I am, however, slowly working towards switching to Python 3.4 as my day-to-day desktop Python version, as well as upgrading my Django site to use Py3. Please count this as another vote to have some sort of Py3 option in the future. I'm really loving using it for the online course, and I'll really miss being able to work on some of my desktop scripts in it.

              My day job is working for a Mac/iOS development company — as the video producer, not a dev, but I do understand a bit of the complexities of this kind of thing on the App Store. I realize it may be a while (and I'm happy to pay again), but just wanted to cheer you on. :) Thanks!

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

                Python 3.5 was released today. https://www.python.org/downloads/release/python-350/

                import platform ; print(platform.python_version())  # '2.7.5' on Pythonista :-(
                

                https://docs.python.org

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

                  Looking for more chatter, it's been two months! This thread is 3 years old and no sight of Python 3.x for pythonista?

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

                    Out of curiosity, when folks complain about Py3 support, which features of Py3 are the feeling like they really use, that are not in futures ? Other than differences in how strings are handled, which can be simulated using six for programs that really need to distinguish between bytes and text, seems to me a lot of the Py3 changes are under the hood where most users won't really directly interact. I guess bugfixes might be important, but it is not like Pythonista was getting a new release for each Py version anyway.

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

                      Things that come to mind:

                      • Unicode handling that is not completely messed up. Even with enough future imports you cannot completely simulate Python 3, simply because the separation is not strictly enforced in Python 2 (you can decode a unicode string, wtf?) and because half the code still uses 8-bit str. Also, proper wide Unicode support,
                      • Cleaned up stdlib names, e. g. urllib2 becomes urllib and has a cleaner structure. Minor things, but I like consistency.
                      • New syntax, like type annotations. (That would make writing function stubs for ctypes much cleaner.)
                      • Less random language weirdness, like print and exec keywords, normal division on ints doing implicit flooring, etc.
                      • Fancy metaclass features, like the metaclass kwarg on class definitions, or __prepare__.
                      • Chained starargs! This took way too long. Finally func(*args, *moreargs) is allowed.
                      • Keyword-only args in function definitions, which previously required ugly stararg hacks.
                      • Proper exception chaining (I think that's new in Python 3).
                      • nonlocal.
                      • I'm sure some people would find the async/await stuff useful too.
                      1 Reply Last reply Reply Quote 0
                      • Webmaster4o
                        Webmaster4o last edited by

                        How do the chained stargs work? If I have func(*args, *moreargs)
                        and I then put in func(1,2,3,4,5,6), how is it decided what goes into the list args and what goes into moreargs?

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

                          Yield from (see PEP 380). Like try to do curio or agent with Python2.

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

                            @Webmaster4o Not when defining functions, but when calling them. For example, this is how you could implement functools.partial:

                            def partial(callable, *frozen_args, **frozen_kwargs):
                                def _partial(*new_args, **new_kwargs):
                                    return callable(*frozen_args, *new_args, **frozen_kwargs, **new_kwargs)
                                return _partial
                            
                            1 Reply Last reply Reply Quote 0
                            • Webmaster4o
                              Webmaster4o last edited by

                              Ah, ok. Now I get it.

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

                                I'm sure @ccc would point this out soon enough ;) but Python 2.7.11 was released today/yesterday: https://www.python.org/downloads/release/python-2711/

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

                                  @dgelessus LOL... Yes. And Python 3.5.1 is due tomorrow: https://www.python.org/downloads/release/python-351

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

                                    Brett Cannon - Where are we in the Python 3 transition? http://www.snarky.ca/the-stages-of-the-python-3-transition

                                    Phuket2 1 Reply Last reply Reply Quote 3
                                    • Phuket2
                                      Phuket2 @ccc last edited by

                                      @ccc , thanks. I subscribed to his blog. I read through quite a few of his blog entries. Really good info for someone like me (limited info on the history of Python and the future and more...) for one, I will start to look at Unicode seriously, it's good to do while I am still a beginner. Anyway, great info from this guy (Not just the mentioned blog entry here) and he has the credentials

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

                                        Most of the posts here are 3 years old. More libraries are now available on Python 3 and it appears to be the clear direction forward for Python. My requirements are for Python 3.

                                        Pythonista looks great and as soon as it is on Python 3 I will purchase it!

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

                                          Just FYI to anyone who may have missed it - it's happening...

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