Thanks!
Johan Dahlin wrote:
Jeffery Collins wrote:
Almost. I applied the patch to my 2.4 version; below is output of a
pychecker call to a file that prints sys.path before and after the
gtk module import.
pychecker jnk.py
Processing jnk...
['', '/opt/vexcel/openev2/lib/python24.zip',
'/opt/vexcel/openev2/lib/python2.4',
'/opt/vexcel/openev2/lib/python2.4/plat-linux2',
'/opt/vexcel/openev2/lib/python2.4/lib-tk',
'/opt/vexcel/openev2/lib/python2.4/lib-dynload',
'/opt/vexcel/openev2/lib/python2.4/site-packages',
'/opt/vexcel/openev2/lib/python2.4/site-packages/Numeric',
'/opt/vexcel/openev2/lib/python2.4/site-packages/gtk-2.0']
['/opt/vexcel/openev2/lib/python2.4/site-packages/pychecker', '',
'/opt/vexcel/openev2/lib/python24.zip',
'/opt/vexcel/openev2/lib/python2.4',
'/opt/vexcel/openev2/lib/python2.4/plat-linux2',
'/opt/vexcel/openev2/lib/python2.4/lib-tk',
'/opt/vexcel/openev2/lib/python2.4/lib-dynload',
'/opt/vexcel/openev2/lib/python2.4/site-packages',
'/opt/vexcel/openev2/lib/python2.4/site-packages/Numeric',
'/opt/vexcel/openev2/lib/python2.4/site-packages/gtk-2.0']
Since the pychecker name and '' differ, the delete didn't work.
Is there any reason why we cannot preserve the path through the import?
import sys
_save_path = sys.path[:]
from _gtk import *
sys.path = _save_path
del sys, _save_path
This does work for my limited test cases.
Okay, seems simple enough for me. I commited something very similar.
Johan
_______________________________________________
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
--
-----------------------------------------------------------------
Jeffery D. Collins, Ph.D. Vexcel Corp.
Sr. Engineer 1690 38th St.
Voice: (303)583-0228 Boulder, CO 80301
Fax: (303)583-0246 vexcel.com
_______________________________________________
pygtk mailing list pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/