dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #04775
Re: Plotting works for elasticity demo
Garth N. Wells skrev den 26/04-2007 følgende:
>
>
> Ola Skavhaug wrote:
> >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 vtk
> >>
> >>My python-vtk package is for Python 2.5, whereas I'm using Python 2.4
> >>due to the SWIG bug. If I do
> >>
> >> python -c "import viper; print viper.__file__"
> >>
> >>I get
> >>
> >> /usr/lib/python2.5/site-packages/viper/__init__.pyc
> >>
> >>Garth
> >
> >It looks like you just updated your ubuntu distro to Feisty Fawn. I heared
> >that VTK is not properly built for python 2.5 there. Perhaps it is better
> >to
> >wait for the packages to be fixed what trying to work out a hack.
> >
>
> I have it working now (built the wrappers using Python 2.4, the switched
> to 2.5).
>
> 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.
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.
Ola
> Garth
>
>
> >Ola
> >
>
>
Follow ups
References
-
Plotting works for elasticity demo
From: Anders Logg, 2007-04-25
-
Re: Plotting works for elasticity demo
From: Garth N. Wells, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Ola Skavhaug, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Garth N. Wells, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Ola Skavhaug, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Garth N. Wells, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Ola Skavhaug, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Garth N. Wells, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Ola Skavhaug, 2007-04-26
-
Re: Plotting works for elasticity demo
From: Garth N. Wells, 2007-04-26