To pass command options to the script, then you could set your arguments in sys.argv before calling the script.<br><br>import sys<br>sys.argv = [&#39;script.py&#39;, &#39;arg1&#39;, &#39;arg2&#39;]<br>execfile(&#39;script.py&#39;)<br>
<br>Pat<br><br><div class="gmail_quote">On Thu, May 6, 2010 at 9:36 AM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu">emonson@cs.duke.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I think he meant that he wants to pass arguments to the script when he launches it (the script), not run a script when he launches paraview from the command line.<br>
<font color="#888888"><br>
-Eric<br>
</font><div><div></div><div class="h5"><br>
<br>
On May 6, 2010, at 9:32 AM, Utkarsh Ayachit wrote:<br>
<br>
&gt; You can use the --script option.<br>
&gt;<br>
&gt;  --script=opt          Set a python script to be evaluated on startup.<br>
&gt;<br>
&gt; e.g.<br>
&gt;&gt; ./paraview --script=/tmp/foo.py<br>
&gt;<br>
&gt; Utkarsh<br>
&gt;<br>
&gt; 2010/5/6 Jérôme Plumecoq &lt;<a href="mailto:jerome.plumecoq@c-s.fr">jerome.plumecoq@c-s.fr</a>&gt;:<br>
&gt;&gt; Hi !<br>
&gt;&gt;<br>
&gt;&gt; I&#39;m new two ParaView and I have one question :<br>
&gt;&gt;<br>
&gt;&gt; I would like to launch a script shell directly from a button (whitout<br>
&gt;&gt; opening the script shell). So I have implemented a plugin which adds a new<br>
&gt;&gt; menu (*), and hence I can launch a python script using pqPythonManager and<br>
&gt;&gt; runScript() from pqPythonDialog.<br>
&gt;&gt;<br>
&gt;&gt; But I would like to launch a script with command line options.<br>
&gt;&gt;<br>
&gt;&gt; do you know if it is possible ? And if it is, how to do this ?<br>
&gt;&gt;<br>
&gt;&gt; I use version 3.8.0-RC1 of ParaView.<br>
&gt;&gt;<br>
&gt;&gt; thanks !<br>
&gt;&gt;<br>
&gt;&gt; Jérôme<br>
&gt;&gt;<br>
&gt;&gt; (*) my goal is to add a new GUI where the user can enter some informations,<br>
&gt;&gt; and launching a python script using these informations.<br>
&gt;&gt;<br>
&gt;&gt; _______________________________________________<br>
&gt;&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;&gt;<br>
&gt;&gt; Visit other Kitware open-source projects at<br>
&gt;&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;&gt;<br>
&gt;&gt; Please keep messages on-topic and check the ParaView Wiki at:<br>
&gt;&gt; <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
&gt;&gt;<br>
&gt;&gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; <a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
&gt;&gt;<br>
&gt;&gt;<br>
&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 <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: <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>
<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>
</div></div></blockquote></div><br>