[Paraview] pqPythonShell on local server & local client

Alexander Wille alexander.wille at mytum.de
Tue Feb 26 09:11:41 EST 2008


Hi everyone,


I got a little closer to using pqPythonShell: pqPythonShell.executeScript(...) actually takes a string argument containing the script and not the filename of the script (this should be more clearly documented). The next problem is that this pqPythonShell has its servermanager not connected to anything. I want it to work hand-in-hand with the GUI, so I need it to connect to the GUI's builtin server. But so far, all my trial-and-error-attempts failed, and just calling servermanager.Connect() without any arguments yields strange results:
- The pipeline browser lists a second, nameless server in the pipeline browser and creates a second 3D view.
- Preceding calls (prior to servermanager.Connect() through pqPythonShell) of servermanager.ActiveConnection in the standard Python Shell of the GUI return 'Connection (builtin::0)' while successive calls return 'Connection (::0)'.
- Using the new connection for creating and registering sources like SphereSource succeed but creating a representation fails.
I must be missing something important. What am I doing wrong?

Best regards,
Alexander Wille

P.S.: Just to make sure you get me right: I'm running a Paraview GUI, launch a pqPythonShell through a GUI plugin and would like it to execute scripts from .py-files just like they would when using Tools->Python Shell.


More information about the ParaView mailing list