Jeffery D. Collins wrote:
I don't know if this is normal behavior, but importing gtk causes
sys.path to be modified. This holds for both pygtk-2.4.1 and
pygtk-2.6.x. The path the python module being run is getting loaded
into the first postion of sys.path. This happens normally when python
is run on a module, but gtk is inserting *another* one.
Why the extra one? This is particularly problematic for pychecker,
which modifies the path so that its own internal modules are exposed
last in sys.path. Some debugging reveals that its the _gtk extension
module that causes the change, but I was not able to determine where the
change is being made.
Thanks for reporting this, I just fixed it in CVS.
The problem was that we're calling PySys_SetArgv, because we want to
remove all options from argv which gtk+ ate up. However PySys_Argv is a
little stupid and always inserts argv[0] into sys.path.
Can you check and see if it solves your problems?
Thanks
Johan
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/