First, I would like to mention that the ParaView binaries come with a program 
called pvpython that is basically just a python interpreter with the paths set 
up.

That said, I understand that it is not always practical to use pvpython in lieu 
of the default python interpreter, so to actually answer your question, you 
also have to add this to your PYTHONPATH

/home/sree/paraview-3.4.0/Utilities/VTKPythonWrapping

After that, python should find the paraview module.

Although not strictly necessary, I also recommend calling 
paraview.servermanager.vtkInitializationHelper.Finalize() right before your 
script exits.  This will make sure that all the VTK object get cleaned up 
nicely and is one of the other things that pvpython will do for you.

-Ken


On 1/23/09 8:59 AM, "Sreejith Kuttanikkad" <sreejit...@gmail.com> wrote:

Dear Paraview,

I can't get python scripting working with paraview. I have downloaded paraview 
binary 3.4.0 for linux and set pythonpath by

export 
PYTHONPATH="/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview/:/home/sree/paraview-3.4.0/bin/"
   in .bashrc file

and in python when i printed the paths it showed the paraview paths:

print sys.path
['', '/home/sree/paraview-3.4.0/lib/paraview-3.4/paraview', 
'/home/sree/paraview-3.4.0/bin'.... ]

however when i followed commands as given in 
http://www.paraview.org/Wiki/ParaView/Python_Scripting
the following error occured.
>>> from paraview import servermanager
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named paraview

what I am missing here.. ?

thanks,
Sreejith





   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

_______________________________________________
ParaView mailing list
ParaView@paraview.org
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to