Dave&#39;s right, you can&#39;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.<br>


<br>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:<br>


<br>   <a href="https://github.com/patmarion/ParaViewSocketPlugin" target="_blank">https://github.com/patmarion/ParaViewSocketPlugin</a><br><br>Pat<br><br><br><div class="gmail_quote">On Wed, Jan 11, 2012 at 12:50 PM, David E DeMarle <span dir="ltr">&lt;<a href="mailto:dave.demarle@kitware.com" target="_blank">dave.demarle@kitware.com</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No pythreads in paraview for you!<div><br></div><div>Sorry. See &quot;gitk 106fd270&quot; for some of the history behind that. </div>



<div><br></div><div>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.</div>

<div><br></div><div>David E DeMarle<br>Kitware, Inc.<br>R&amp;D Engineer<br>21 Corporate Drive<br>Clifton Park, NY 12065-8662<br>Phone: <a href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a><br>




<br><br><div class="gmail_quote"><div><div>On Wed, Jan 11, 2012 at 12:43 PM, Felipe Bordeu <span dir="ltr">&lt;<a href="mailto:felipe.bordeu@ec-nantes.fr" target="_blank">felipe.bordeu@ec-nantes.fr</a>&gt;</span> wrote:<br>



</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>

Hello,<br>
<br>
I want to use a tablet (android) to control the  GUI (rotation, pan, zoom) in paraview.<br>
In the python shell a made network connection (socket) the sent command that I translate into paraview commands (this work ok).<br>
<br>
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):<br>
<br>
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.<br>
a example code is attached (very little code).<br>
<br>
can I use threads inside paraview python shell, or I have to use c++??? (I prefer python, no need to recompile)<span><font color="#888888"><br>
<br>
-- <br>
<br>
Felipe Bordeu Weldt<br>
Ingénieur de Recherche<br>
------------------------------<u></u>-------<br>
Tél. : <a href="tel:33%20%280%292%2040%2037%2016" value="+13302403716" target="_blank">33 (0)2 40 37 16</a> 57<br>
Fax. : <a href="tel:33%20%280%292%2040%2074%2074" value="+13302407474" target="_blank">33 (0)2 40 74 74</a> 06<br>
<a href="mailto:Felipe.Bordeu@ec-nantes.fr" target="_blank">Felipe.Bordeu@ec-nantes.fr</a><br>
Institut GeM - UMR CNRS 6183<br>
École Centrale Nantes<br>
1 Rue de La Noë, 44321 Nantes, FRANCE<br>
------------------------------<u></u>-------<br>
<br>
</font></span><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>