Pat,
I tested the code and work as expected.
Thanks.
Felipe
On 11/01/2012 21:05, Pat Marion wrote:
Dave's right, you can't use python threads in the paraview python
shell. After your while loop exits, control is returned to the Qt
event loop and the python thread has no chance to cycle. It might
work if you try pvpython instead.
You could also try a plugin I wrote last year... you have to compile
it, but then you can do everything from python, no additional
recompiling. It adds UI for creating remote control sockets in the
paraview gui, and all character data received on the socket is
executed directly in the python shell. I just put it up on github:
https://github.com/patmarion/ParaViewSocketPlugin
Pat
On Wed, Jan 11, 2012 at 12:50 PM, David E DeMarle
<dave.dema...@kitware.com <mailto:dave.dema...@kitware.com>> wrote:
No pythreads in paraview for you!
Sorry. See "gitk 106fd270" for some of the history behind that.
I am guessing it would take a significant amount of work to make
it all work right. Hopefully others on the list will correct me.
David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909 <tel:518-881-4909>
On Wed, Jan 11, 2012 at 12:43 PM, Felipe Bordeu
<felipe.bor...@ec-nantes.fr <mailto:felipe.bor...@ec-nantes.fr>>
wrote:
Hello,
I want to use a tablet (android) to control the GUI
(rotation, pan, zoom) in paraview.
In the python shell a made network connection (socket) the
sent command that I translate into paraview commands (this
work ok).
The problem is that the GUI is not respond to the user
iterations during the network iteration (I have a while loop
in the python):
so the idea was to create a thread to treat all the network
commands, but the code in the second thread is executed only
for the time the main thread is running.
a example code is attached (very little code).
can I use threads inside paraview python shell, or I have to
use c++??? (I prefer python, no need to recompile)
--
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.bor...@ec-nantes.fr <mailto:felipe.bor...@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
_______________________________________________
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.bor...@ec-nantes.fr
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------
_______________________________________________
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