You are here

Python as a common app?

3 posts / 0 new
Last post
Nick Ring
Offline
Last seen: 15 years 7 months ago
Joined: 2009-07-07 16:36
Python as a common app?

Hi,

It seems that Python is used more and more in applications (in general) and I have noticed that more portable applicatons use Python. Instead of having multiple copies of Python 'install' on the USB key (and taking up space), has anyonw thought of having Python as a 'common' application (like what has been to Java)? Is this possible?

Cheers,
Nick

jnw222
Offline
Last seen: 12 years 10 months ago
Joined: 2009-05-30 11:10
i am sure it might be and i

i am sure it might be

and i like it, blender and a couple other apps use it, and unlike gtk, they could all probably use a common python

Chris Morgan
Chris Morgan's picture
Offline
Last seen: 9 years 8 months ago
Joined: 2007-04-15 21:08
Not really

Most/all Python apps have used py2exe, which compiles what they need into it. Many of these apps will also check if it's compiled, and change their behaviour somewhat, for example BPBible runs in debug mode, unless it's compiled, unless it's also got the -d switch. So it's not practical to have a shared copy and run them from source.

I've wondered about this before, but it's just not practical. Apps that just include Python from source; take for example Inkscape's version of Python it includes. It's not a stock version, it's got quite a few extra libraries, and you just can't manage them properly. About the best I can think of is having a stock installation in CommonFiles\Python25 and CommonFiles\Python26 (you do have different versions, they would need to be separate. Some apps use 2.5, some use 2.6, some use 3.0. They're quite different). Then, for any extra files needed which would normally go in Lib\site-packages, have App\AppName\PythonLib\site-packages\* and add App\AppName\PythonLib to PYTHONPATH (I'm getting that from the Blender Portable launcher). I'm not sure if this would work, but I really don't think it's worth it. The only apps we've got which are official or near official which use Python, but not a py2exe'd version, are Blender, which uses Python 2.6.2 and needs special code to handle it, and Inkscape, which expects it in App\Inkscape\python... and it's 2.5.4. So each of them would need a separate version... so what's the point?

Summary: possible, but no practical benefit.

I am a Christian and a developer and moderator here.

“A soft answer turns away wrath, but a harsh word stirs up anger.” – Proverbs 15:1

Log in or register to post comments