[Paraview] ParaViewSocketPlugin
Felipe Bordeu
felipe.bordeu at ec-nantes.fr
Fri Dec 7 13:18:15 EST 2012
Thanks pat,
This is the result. https://www.youtube.com/watch?v=6vqPQAWEqBk
Felipe
Le 06/12/2012 13:57, Pat Marion a écrit :
> Yes, you can send information back through the socket. If you're
> using the socket to invoke python code, then any string returned by
> your python code will be written to the socket. But, by default the
> python handler method doesn't return anything. If you edit
> pqPythonSocketHandler.cxx, you can change the python handler function
> that is used. Just put some code like this at the top of
> onSocketReadReady():
>
> PyObject* mainModule = PyImport_AddModule("__main__");
> PyObject* mainDict = PyModule_GetDict(mainModule);
> this->Internal->Callback = PyDict_GetItemString(mainDict, "myFunction");
>
> That will make the socket forward the string to a python function
> you've implemented called "myFunction()", and any string returned by
> that will be written to the socket.
>
> Pat
>
> On Thu, Dec 6, 2012 at 12:42 AM, Felipe Bordeu
> <felipe.bordeu at ec-nantes.fr <mailto:felipe.bordeu at ec-nantes.fr>> wrote:
>
> hi everybody,
>
> I'm using the great plugin ;) ParaViewSocketPlugin, to control
> ParaView. But now I will like to have some information sent back
> to the client. I look at the sources but I couldn't figure out
> the way to do it.
>
> Is this possible, using the plugin (or some minor modifications) ???
>
> Felipe
>
> --
> Felipe Bordeu Weldt
> Ingénieur de Recherche
> -------------------------------------
> Tél. : 33 (0)2 40 37 16 <tel:33%20%280%292%2040%2037%2016> 57
> Fax. : 33 (0)2 40 74 74 <tel:33%20%280%292%2040%2074%2074> 06
> Felipe.Bordeu at ec-nantes.fr <mailto:Felipe.Bordeu at ec-nantes.fr>
> Institut GeM - UMR CNRS 6183
> École Centrale Nantes
> 1 Rue de La Noë, 44321 Nantes, FRANCE
> -------------------------------------
>
> _______________________________________________
> Powered by www.kitware.com <http://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
>
>
--
Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
Felipe.Bordeu at ec-nantes.fr
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121207/47eafb49/attachment.htm>
More information about the ParaView
mailing list