Upgrading from Pythonista 2 - is version 3 for me?
Plungestep last edited by
I primarily use Pythonista to write code to solve Project Euler problems (https://projecteuler.net). I use a number of libraries, like itertools, numpy, etc. This problem-solving approach helps me learn Python. I need to often refer back to code I wrote in the past for help with the new code I write. I purchased Pythonista 2 a long time ago, and it has worked well.
What does version 3 offer? Would it work well for my needs? I'd like to advance my skills a little more with Python, and I'm not afraid to try new things as I learn. Thanks!
ccc last edited by
Pythonista 3 lets you run Python 3 https://wiki.python.org/moin/Python2orPython3
Bottom line.. do the upgrade.
Plungestep last edited by
Sounds good, thanks.
dgelessus last edited by
There's technically nothing wrong with staying on Pythonista 2. If you have already purchased version 2 and don't want to upgrade, you can continue to use the old version. It should even work on iOS 11, unlike many older apps.
However be aware that Pythonista 2 is not really supported anymore. You cannot purchase it in the App Store anymore, you can only redownload it if you already own it. There also won't be any updates for new devices and iOS versions, and the included Python interpreter and libraries won't be updated.
Pythonista 3 is the current and actively developed version, and it includes all of Pythonista 2's features, plus Python 3 support and various other improvements. (omz is also working on a fairly big update for iOS 11, most importantly with Files support and iCloud sync.) Python 2 is still supported in Pythonista 3, so you can continue to use your Python 2 scripts if they are not easy to port to Python 3. Importing your scripts from Pythonista 2 is also very easy, your Pythonista 2 files show up as a special folder in Pythonista 3.
Also be aware that Python 2 itself won't be supported much longer. Official security and bugfix releases for Python 2 will only be provided until 2020, and many Python libraries will also stop supporting Python 2 around that time (some have already stopped supporting Python 2). Of course none of this will stop your existing code from working, but in a few years you won't be able to use current versions of many libraries in Python 2 anymore.
Long story short, if you want to continue using Pythonista in the future (and if you want to support omz) I would strongly recommend getting Pythonista 3, so you have a current and supported version of the app, Python, and the bundled libraries, receive future updates, and can use current Python code without problems.
technoway last edited by
These are the differences I encountered with Python 3.
There are many new libraries. Some deprecated libraries are replaced with better alternatives.
Python 3 has unicode support for strings. (This is good and bad, as it can require more work porting some Python 2 programs).
The print statement becomes a function, i.e. you must use curly brackets with print statements.
There is no "xrange" statement, and "range" behaves like Python 2's "xrange."
For Pythonista 3, if you push the "run" button and hold it, an option appears that will let you select to run the program with Python 2. Alternatively, if the first line of the program is:
then you can just push the "run" button, and the program will run under Python 2.
You probably don't need Python 3 for the problems you're solving, however, as noted, Python 2 is not advancing anymore, so you might want to know Python 3 for the future.