Hi,

This, I think should work:

------------------
from paraview.simple import *

# Create a view
view = CreateRenderView()

# Initialize a new interactor
from vtk.libvtkRenderingPython import *
iren = vtkRenderWindowInteractor()
iren.SetInteractorStyle(vtkInteractorStyleTrackball())
iren.SetRenderWindow(view.GetRenderWindow())
iren.Initialize()

# Build pipeline
Sphere()
Show()
Render()

# Start interaction
iren.Start()
----------------

I'm using the latest ubuntu 12.04 so I suspect maybe this isnt too
good... Anyway, when I run the code I get:

-----
$ python test.py
Traceback (most recent call last):
   File "test.py", line 7, in <module>
     from vtk.libvtkRenderingPython import *
ImportError: No module named libvtkRenderingPython
-----

I then read that maybe I should better use "pvpython", this gives:

--
$ pvpython test.py
Error converting executable file "/usr/bin/../lib/paraview/pvpython" to
real path: No such file or directory
--


Sorry, I don't have much experience with this. It's a noob question, I
know. I hope somebody knows the answer/solution. Thank you very much -
I've been struggling with this (and making simple paraview python
scripts) for about 10 hours. No I have to ask you guys...
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to