[Paraview] pqPythonShell on local server & local client

clinton at elemtech.com clinton at elemtech.com
Fri Feb 29 11:57:05 EST 2008


Have a look at pqMainWindowCore::initPythonInterpretor()
which gets called when the python dialog is brought up.  It sets the 
servermanager.ActiveConnection for scripts to use.
You probably need to do the same, when you bring up your python widget.
Its basically getting some stuff from the C++ side and putting it into the 
python space.

Clint

On Friday 29 February 2008 4:18:31 am Alexander Wille wrote:
> Hello everyone,
>
> I've dug deeper into the problem I've described previously. It seems like
> pqPythonShell can be worked with like a fresh pvpython-instance. I.e.,
> pqPythonShell reacts the same way to code you execute on it using its
> executeScript()-method as pvpython would right after you started it; The
> only difference is what I stated in my last post (calling Connect() on a
> pqPythonShell's servermanager causes Paraview to crash in a strange
> fashion). So solving the problem with pvpython should solve it with
> pqPythonShell as well. Now, when I connect the GUI to a pvserver, the
> pvserver stops waiting for more clients (= it only accepts one). After
> that, every attempt of connecting a pqPythonShell (in a Plugin) or pvpython
> to that server fail; It seems as if the GUI-internal servermanager had
> taken exclusive control over the server (which does make sense, I think).
> So what I need is not a pqPythonShell with its own servermanager, but one
> already connected to the builtin server (= the GUI-internal one) OR a
> Connect()-function of the servermanager working as intended, i.e. connect
> to the builtin server and not start a builtin server and then connect to
> it. How do I get such a pqPythonShell or did I misunderstand the
> Connect()-method? Or is this a bug?
>
>
> Best regards,
> Alexander Wille




More information about the ParaView mailing list