Python 3.5 comes to iThings

2157
0
06-16-2016 09:46 PM
Labels (1)
DanPatterson_Retired
MVP Emeritus
4 0 2,157

Yes ... for a whole $7 Canadian, you too can do cutting edge programming on your iThing ... iPad 2 or above, the iPhone maybe even the iWatch. See ...  Pythonista for iOS

Well, if you don't have an iPhone, iPad or iWhatever to program on, you can keep up with conventional python innovations and update here:

Coming to Python.... preparation and anticipation

Oh... and os.walk alone, is so yesterday... os.scandir is the new kid providing speedups... but failing python 3.5, you can get it from github thankfully:

GitHub - benhoyt/scandir: Better directory iterator and faster os.walk(), now in the Python 3.5 stdl...

or just wait until 3.5 comes along.

Now ... the iStuff

I have mentioned the program Pythonista (available at the iStore) as a great program for doing programming.  I have been using the 2.7 version for about 2 years now and I am impressed with its IDE.  The new version runs both python 3.5 (yes... 3.5) and python 2.7.  It contains many, many modules by default, including numpy and MatPlotLib to name just a few.  You can ship your cool scripts off to github, OneDrive, all those cloud places.  You can even produce pdfs amongst other things.  A downside... some bizarre Apple policy  (no clue what it means) makes it just a tad hard to load a script directly... (but we all know how to copy and paste content don't we, or consult a 12 year old).

So, have a gander at your site-packages folder in your python distribution and just add more.  Do you like line numbering? code completion? indent/dedent? cool IDE themes (like the Dark Theme) and whole load of other stuff, then you might be interested.   SciPy and Pandas isn't included yet, so you will have to do your Voronoi Diagrams and Delauney Triangulations the old fashioned way through pure python and/or numpy or MatPlotlib.  Ooops, I forgot, most of you don't have it since you aren't using ArcGIS Pro yet, so you won't miss it (you will have to install Pro to get python 3.4.x and the SciPy stack with other goodies).

But how cool... standing at the bus stop... whip out the iPad and run a quick triangulation in Matplotlib... how to impress potential employers who might be watching.

image.png

I can't wait until esri gets something that allows me to do analysis on the iThings so I can work with arcpy, numpy and all my favorite libs and pys.  Imagine being able to graph data in the field as it is being collected...

image.png

Two screen grabs just to give you a quick view of other stuff.  I will update when I play with the new version more.

image.png

Sample script, using a partial split screen for output on an iPad.  Imagine how cool this would look on your iPhone

image.png

Alternate theme, for the moody programmer...

image.png

The python 2.7 and 3.5 distributions have their own access points with their own site_packages folder and even a shared one.  Kind of like a version of condas... maybe iCondas...

image.jpeg

Later

... Dan

About the Author
Retired Geomatics Instructor at Carleton University. I am a forum MVP and Moderator. Current interests focus on python-based integration in GIS. See... Py... blog, my GeoNet blog...
Labels