[vtkusers] vtkpython weirdness
Chris Want
cwant at ualberta.ca
Fri Sep 16 11:45:59 EDT 2005
Hi folks,
I have observed a rather strange behavior with 'vtkpython'
that didn't happen back in the old days (i.e., back in April):
it no longer sets a correct sys.path unless the full path is
used when executing the vtkpython binary.
I hope the following illustrates this peculiarity
(here I do not have a PYTHONPATH set in my
environment):
1) Called via 'vtkpython' and found in PATH variable:
blarg{cwant}~$ which vtkpython
/usr/local/vtk/bin/vtkpython
blarg{cwant}~$ vtkpython
vtk version 5.1.0, vtk source $Revision: 1.2210 $, $Date: 2005/09/15
08:53:37 $ (GMT)
Python 2.3.5 (#2, Jun 19 2005, 13:36:02)
[GCC 3.3.6 (Debian 1:3.3.6-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload',
'/usr/local/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages', '/usr/lib/site-python']
2) Called with full path '/usr/local/vtk/bin/vtkpython':
blarg{cwant}~$ /usr/local/vtk/bin/vtkpython
vtk version 5.1.0, vtk source $Revision: 1.2210 $, $Date: 2005/09/15
08:53:37 $ (GMT)
Python 2.3.5 (#2, Jun 19 2005, 13:36:02)
[GCC 3.3.6 (Debian 1:3.3.6-6)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print sys.path
['', '/usr/local/vtk/lib/python2.3/site-packages',
'/usr/lib/python23.zip', '/usr/lib/python2.3',
'/usr/lib/python2.3/plat-linux2', '/usr/lib/python2.3/lib-tk',
'/usr/lib/python2.3/lib-dynload',
'/usr/local/lib/python2.3/site-packages',
'/usr/lib/python2.3/site-packages', '/usr/lib/site-python']
In the second example, the python wrapping stuff in
/usr/local/vtk/lib/python2.3/site-packages is found,
and I can run a vtk script, in the first example
I can not run scripts using vtk. Same executable,
two different behaviors ... kinda weird!
Chris
--
____________________________________________________________________
( Chris Want )
( Research Computing Support )
( Academic Information and Communication Technologies (AICT) )
( University of Alberta )
( Tel: 1-780-492-9418 )
--------------------------------------------------------------------
More information about the vtkusers
mailing list