<div dir="ltr"><div>Hi Tim,<br><br>ParaView reassigns sys.stdout so that output can be routed to the ParaView python console window.  Your script could set stdout back to the original value:<br><br></div>import sys<br>sys.stdout = sys.__stdout__<br>


<div>sys.stderr = sys.__stderr__<br></div><div><br>For documentation, see:<br><br><a href="http://docs.python.org/2/library/sys.html#sys.stdout" target="_blank">http://docs.python.org/2/library/sys.html#sys.stdout</a><br>

<br><br></div><div>
Pat<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 10, 2013 at 1:40 AM, Timothy Cale <span dir="ltr">&lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Utkarsh:<div><br></div><div>Thanks! Works!</div><div><br></div><div>I had tried that: I thought it had not worked, because it (python?, pvpython?) did not print to the screen from a test script. </div>



<div><br></div><div>Is there a way to print info to the screen (or to a specified file)? When I use &quot;Run Script&quot; (to run show_vtu.py) from the python shell that is started when Tools -&gt; Python Shell is manually selected, prints to the screen work.</div>



<div><br></div><div>Thanks,</div><div>Tim</div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, May 8, 2013 at 8:09 AM, Utkarsh Ayachit <span dir="ltr">&lt;<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@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">You can use the &quot;--script&quot; command line argument to &quot;paraview&quot;<br>
executable to run a Python script after startup e,g,<br>
&gt; paraview --script=show_vtu.py<br>
<br>
Utkarsh<br>
<div><div><br>
On Sat, May 4, 2013 at 12:45 PM, Timothy Cale &lt;<a href="mailto:drtsc.para@gmail.com" target="_blank">drtsc.para@gmail.com</a>&gt; wrote:<br>
&gt; I would like to display a set of meshes that result from a (bash) script<br>
&gt; driven set of simulations<br>
&gt; and meshing steps.<br>
&gt;<br>
&gt; I have written a script that does what I want (at least basically), if I<br>
&gt; manually go into the paraview<br>
&gt; gui and start the (Tools --&gt;) Python Shell, then hit run script and select<br>
&gt; the desired script.<br>
&gt;<br>
&gt; In an attempt to automate the visialization, I wrote a bash script with the<br>
&gt; two relevant lines being:<br>
&gt;<br>
&gt; paraview &amp;&gt;/dev/null &amp;<br>
&gt; pvpython show_vtu.py<br>
&gt;<br>
&gt; This generates non-persistent, non-interactive images that I expect - though<br>
&gt; it would be good<br>
&gt; to know if there is a way to make such images persistent and interactive.<br>
&gt; (in addition to<br>
&gt; starting paraview)<br>
&gt;<br>
&gt; Question:  Is there a way to use such a script (bash, python called from<br>
&gt; bash . . . ) to<br>
&gt; start paraview, and use a script to visualize data in the gui?<br>
&gt;<br>
&gt; Thanks,<br>
&gt; Tim<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;<br>
</blockquote></div><br></div>
</div></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></div></div>