Python 2.5 vs Python 3.x ...

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Sat Apr 13, 2013 4:42 pm
moscomedve offline
Posts: 34
Joined: Apr 02, 2012

Python 2.5 vs Python 3.x ...

I'm sorry if this has been previously addressed, I am rather new to python, coming from AppleScript. I am wondering why you have to use python 2.5, even though it seems to be obsolete according to the python.org. They say to use either 2.7 or 3.x. From the Indigo documentation I read that you must use 2.5 only, so I am wondering why this is, and if the difference really matters that much.

Thanks in advance.

Posted on
Sun Apr 14, 2013 9:51 am
matt (support) offline
Site Admin
User avatar
Posts: 21416
Joined: Jan 27, 2003
Location: Texas

Re: Python 2.5 vs Python 3.x ...

Good question. Indigo's python based plugin and script context is not a python library/module that can be included by any running python interpreter.

Rather, it is a process that when launched connects to the Indigo Server and then executes python commands within a special context from which you can then make calls to Indigo, inspect devices/etc., and if you are a plugin, receive python callbacks when actions occur/etc. So this process (which we call the IPH, Indigo Plugin Host) is a special Indigo client that exposes Indigo functionality via python calls.

We had a couple of choices when deciding how the IPH would call python. We could either include our own python library, in which case we could include the most recent version of 2.x or 3.x or we could rely on the python framework included in OS X. We decided for the latter. The gotcha is that we have to use the minimum python version supported by the minimum version of OS X under which Indigo Server can run. That is OS X 10.5. For consistent results, we want the python environment used by Indigo to be the same regardless of the Mac OS X version you are running. So we have to use OS X's version of python 2.5 across all versions of OS X (even ones that have more recent python versions).

I think it is possible for us to embed our own python framework that works well under OS X, but getting that built/QA'd/installed is non-trivial. So for the time being (v6 at the very least), we will be relying on OS X's python framework.

Image

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests