Python versions

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
Tue May 31, 2011 11:25 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Python versions

Your guide says that Indigo is using Python 2.5. Does this mean that you're using Python 2.5 even when running on Snow Leopard?

BTW, your guide also says that Snow Leopard uses Python 2.7. That does not seem to be the case; it's 2.6 (with 2.5.1 also supported).

Cheers
-- perry

Posted on
Wed Jun 01, 2011 7:33 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Python versions

Perry The Cynic wrote:
Your guide says that Indigo is using Python 2.5. Does this mean that you're using Python 2.5 even when running on Snow Leopard?

BTW, your guide also says that Snow Leopard uses Python 2.7. That does not seem to be the case; it's 2.6 (with 2.5.1 also supported).


From what I see in the Indigo 5 Beta 4, it appears that Matt has included an Embedded copy of Python v2.5x.

This is actually quite a excellent idea from a support perspective, because it means that Apple (or the user) can't just upgrade the Python that is included in Indigo. So everyone that uses Indigo v5 will be ensured of using the same version of Python.

It also means that when Matt decides to upgrade, he can pick and choose what version of Python to upgrade to... And he can indicate what version of Indigo uses what version(s) of python...

It simplifies support, and makes the job of the developer a little easier.

Now, that being said. Python v2.5x is outshines by some of the later versions of python... But I imagine that is the version of python that v4 was designed around. I think the first step is to get v5 out the door, and then work on optimizing and finishing all the big ticket v5.x items on his hit list...

I also have some concerns with newer versions of python. v2.5x was what I started with, and while I use later versions, I keep having to look up what changes have been made... Targeting a single version of Python is quite important with a project of this size...

Regarding the Python versions included with Mac OS X... I concur.

Python 2.61 is in 10.6.7
Python 2.71 is in 10.7.x

I just checked...

- Ben

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Wed Jun 01, 2011 8:42 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Python versions

We actually are not embedding python, but we specifically target whatever 2.5 version is installed by the OS. For the most recent version of 10.5.8 that is python 2.5.1, for 10.6.7 it will be 2.5.4.

Ideally I would like to embed python so not even the minor version would change across different OS installs, but the Apple python framework includes lots of potentially useful modules. Getting those modules built into our own python library and tested across different OS versions is more work than we want to do right now.

Perry The Cynic wrote:
BTW, your guide also says that Snow Leopard uses Python 2.7.

You are correct. We've updated the Wiki.

Image

Posted on
Wed Jun 01, 2011 9:42 am
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Python versions

We actually are not embedding python, but we specifically target whatever 2.5 version is installed by the OS. For the most recent version of 10.5.8 that is python 2.5.1, for 10.6.7 it will be 2.5.4.


So it is possible that a plugin developed in Snow Leopard may not (quite) work on Leopard (2.5.4 -> 2.5.1)?

Will there be a way to mark a plugin "Snow Leopard or later" or such?

And given that plugins are separate processes: is there any chance that we can get the plugin host to run 2.6? I'm not looking forward to taking all my 2.6 code and retrofitting it to run on 2.5.

Cheers
-- perry

Posted on
Wed Jun 01, 2011 10:56 am
matt (support) offline
Site Admin
User avatar
Posts: 21417
Joined: Jan 27, 2003
Location: Texas

Re: Python versions

Perry The Cynic wrote:
So it is possible that a plugin developed in Snow Leopard may not (quite) work on Leopard (2.5.4 -> 2.5.1)?

Possible, but I am hopeful that since it is just a dot-difference it won't happen.

Perry The Cynic wrote:
Will there be a way to mark a plugin "Snow Leopard or later" or such?

Not directly, but your plugin could do it at runtime if really needed to for some reason:

Code: Select all
import sys
sys.version_info


Perry The Cynic wrote:
And given that plugins are separate processes: is there any chance that we can get the plugin host to run 2.6? I'm not looking forward to taking all my 2.6 code and retrofitting it to run on 2.5.

Unfortunately, that isn't possible without a non-trivial amount of work on our end.

Image

Posted on
Wed Jun 01, 2011 2:40 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Python versions

support wrote:
We actually are not embedding python, but we specifically target whatever 2.5 version is installed by the OS. For the most recent version of 10.5.8 that is python 2.5.1, for 10.6.7 it will be 2.5.4.

Ideally I would like to embed python so not even the minor version would change across different OS installs, but the Apple python framework includes lots of potentially useful modules. Getting those modules built into our own python library and tested across different OS versions is more work than we want to do right now.

Perry The Cynic wrote:
BTW, your guide also says that Snow Leopard uses Python 2.7.

You are correct. We've updated the Wiki.


I've been corrected... I thought I saw some Python support files that implied that it was embedded...

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests