Thread Previous • Date Previous • Date Next • Thread Next |
Ola Skavhaug wrote:
Garth N. Wells skrev den 26/04-2007 følgende:Ola Skavhaug wrote:I have it working now (built the wrappers using Python 2.4, the switched to 2.5).Garth N. Wells skrev den 26/04-2007 følgende:[snip]Looks like a problem with my VTK-Python bindings. I get >python2.4 -c "import viper; print viper.__file__" Traceback (most recent call last): File "<string>", line 1, in ?File "/usr/lib/python2.4/site-packages/viper/__init__.py", line 1, in ?from viper import *File "/usr/lib/python2.4/site-packages/viper/viper.py", line 10, in ?import vtk ImportError: No module named vtkMy python-vtk package is for Python 2.5, whereas I'm using Python 2.4 due to the SWIG bug. If I dopython -c "import viper; print viper.__file__" I get /usr/lib/python2.5/site-packages/viper/__init__.pyc GarthIt looks like you just updated your ubuntu distro to Feisty Fawn. I hearedthat VTK is not properly built for python 2.5 there. Perhaps it is better towait for the packages to be fixed what trying to work out a hack.Viper works great! Is it easy to send a snapshot to a file? Can it be called from C++?Sending a snapshot to a file is easy; just press the "i" (for image) key. I added this today (previously the "p" key was used, but that is a vtk keypress event that cannot be turned off). Pressing "h" will display the keybindings.
Are the key bindings all defined by Viper, or are some defined VTK? If some are VTK, is there a list somewhere?
Garth
It should be possible to use Viper from C++, but, in that case, a Python interpreter must be embedded in a library somehow. I have never done this.OlaGarthOla
-
Thread Previous • Date Previous • Date Next • Thread Next |