Python question

DreiJane 1 at depikt.net
Mon Apr 12 08:19:37 CEST 2010


Hello,

Python and gtk are "ambulant" (portable plus intallable by mere
copying without admin rights). gtk only needs to have the path to its /
bin on the PATH . The latter could - and possibly should be - done by
the Python scripts using it, for example:

s = os.environ['PATH']
if s.find(gtkBinDir) == -1: os.putenv("PATH", os.getenv("PATH")+
os.pathsep + gtkBinDir)

for gtkBinDir from some GlobalConstants.py.

Pygtk breaks that "ambulance" - its parts use the registry, but only
for finding Python during installation. Afterwards such a Python is
ambulant again - that means with its pygtk (this little flaw is a
minor reason for me to work on my depikt). I am on Windows normally,
but never considered pywin.

Good luck, Joost



More information about the Python-list mailing list