<div dir="ltr"><div><div><div><div><div>Hi Bill,<br><br>1) I submitted a patch to ParaView that makes copy and paste work.  I think the patch didn&#39;t make it into ParaView 4.0 release candidate, but hopefully it can be available soon.  The commit is in the PythonQt-pv4.0 branch that I mentioned to you in another email.  It is:<br>

<br><a href="https://github.com/patmarion/ParaView/commit/4a092e2d9f492ebb77a864d3080823c0b431754f">https://github.com/patmarion/ParaView/commit/4a092e2d9f492ebb77a864d3080823c0b431754f</a><br><br></div>2) All the Python code in the python shell has to run on the main thread, so if you have a loop that does not return, it will block the gui.  My suggestion, if you are using PythonQt, is to use a QTimer to look for changes to the data file.  Here&#39;s a QTimer example using PythonQt which will not block the gui:<br>

<br><br></div>from PythonQt import QtCore, QtGui<br><br></div><div>def myCallback():<br></div><div>    print &#39;checking data file...&#39;<br><br></div>timer = QtCore.QTimer()<br>timer.connect(&#39;timeout()&#39;, onPlayTimer)<br>

</div>timer.setTimeout(100) # start timer with 100 msec timeout<br><br><br></div>Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 7, 2013 at 4:28 PM, Bill Sherman <span dir="ltr">&lt;<a href="mailto:shermanw@indiana.edu" target="_blank">shermanw@indiana.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello ParaView people,<br>
<br>
I have a couple questions about the Python shell in the ParaView GUI client:<br>
<br>
1) Will we be able to paste text from the OS clipboard into the shell<br>
such that it will be treated as input?  (Currently pasted text gets<br>
ignored.)<br>
<br>
2) Is there a way to have an ongoing loop that doesn&#39;t totally disable<br>
the client GUI?  My goal is to have a script that watches for a change<br>
in the data file and then will cause the pipeline to update, but if I<br>
use the &quot;pyinotify&quot; package, the &quot;loop&quot; method goes into an enduring<br>
loop, and so the Python shell doesn&#39;t relinquish control back to the<br>
GUI, effectively freezing the ParaView client.  In fact I don&#39;t even<br>
know how to send an interrupt to the Python in the shell.<br>
<br>
As a quick test, an infinite while loop has the save effect:<br>
        -&gt; Tools -&gt; Python Shell<br>
<br>
        &gt;&gt;&gt; count = 0<br>
        &gt;&gt;&gt; while 1:<br>
        ...   count = count + 1<br>
        ...   print count<br>
        ...<br>
        1<br>
        2<br>
        [...]<br>
<br>
(frozen GUI).<br>
<br>
        Thank you!<br>
        Bill<br>
<br>
--<br>
Bill Sherman<br>
Sr. Technology Advisor<br>
Advanced Visualization Lab<br>
Pervasive Technology Inst.<br>
Indiana University<br>
<a href="mailto:shermanw@indiana.edu" target="_blank">shermanw@indiana.edu</a><br>
______________________________<u></u>_________________<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/<u></u>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/<u></u>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/<u></u>mailman/listinfo/paraview</a><br>
</blockquote></div><br></div>