<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="Content-Type">
</head>
<body bgcolor="#ffff99" text="#000000">
It works fine ! :-)<br>
Thank you very much !<br>
<br>
J&eacute;r&ocirc;me<br>
<br>
Le 06/05/2010 16:09, pat marion a &eacute;crit&nbsp;:
<blockquote
 cite="mid:h2m2c86953b1005060709w9ac9f669z7f0221829d9a7bcc@mail.gmail.com"
 type="cite">Use pqPythonDialog::runString(const QString&amp; script).&nbsp;
Calling pqPythonDialog::runString("execfile('script.py')") is the same
as calling pqPythonDialog::runScript(QStringList("script.py")).<br>
  <br>
Pat<br>
  <br>
  <div class="gmail_quote">2010/5/6 J&eacute;r&ocirc;me Plumecoq <span dir="ltr">&lt;<a
 moz-do-not-send="true" href="mailto:jerome.plumecoq@c-s.fr">jerome.plumecoq@c-s.fr</a>&gt;</span><br>
  <blockquote class="gmail_quote"
 style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
    <div bgcolor="#ffff99" text="#000000">Yes, indeed, I want to pass
arguments to the python script, not run a
script when launching paraview.<br>
    <br>
Le 06/05/2010 15:38, pat marion a &eacute;crit&nbsp;:
    <div class="im">
    <blockquote type="cite">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 = ['script.py', 'arg1', 'arg2']<br>
execfile('script.py')<br>
      <br>
Pat<br>
      <br>
    </blockquote>
    <br>
    </div>
ok, but I would like to do it in C++ (with the pqPythonDialog's method
runScript(scripts), where scripts is a list (in fact, only one) of
python scripts...<br>
    <font color="#888888"><br>
J&eacute;r&ocirc;me</font>
    <div>
    <div class="h5"><br>
    <br>
    <br>
    <blockquote type="cite">
      <div class="gmail_quote">On Thu, May 6, 2010 at 9:36 AM, Eric E.
Monson <span dir="ltr">&lt;<a moz-do-not-send="true"
 href="mailto:emonson@cs.duke.edu" target="_blank">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><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; &nbsp;--script=opt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;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&eacute;r&ocirc;me Plumecoq &lt;<a moz-do-not-send="true"
 href="mailto:jerome.plumecoq@c-s.fr" target="_blank">jerome.plumecoq@c-s.fr</a>&gt;:<br>
&gt;&gt; Hi !<br>
&gt;&gt;<br>
&gt;&gt; I'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&eacute;r&ocirc;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 moz-do-not-send="true"
 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 moz-do-not-send="true"
 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 moz-do-not-send="true"
 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 moz-do-not-send="true"
 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 moz-do-not-send="true" href="http://www.kitware.com"
 target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at <a
 moz-do-not-send="true"
 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
 moz-do-not-send="true" 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 moz-do-not-send="true"
 href="http://www.paraview.org/mailman/listinfo/paraview"
 target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
        <br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
 target="_blank">www.kitware.com</a><br>
        <br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
 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
 moz-do-not-send="true" href="http://paraview.org/Wiki/ParaView"
 target="_blank">http://paraview.org/Wiki/ParaView</a><br>
        <br>
Follow this link to subscribe/unsubscribe:<br>
        <a moz-do-not-send="true"
 href="http://www.paraview.org/mailman/listinfo/paraview"
 target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
        </div>
        </div>
      </blockquote>
      </div>
      <br>
      <pre><fieldset></fieldset>
_______________________________________________
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
 target="_blank">www.kitware.com</a>

Visit other Kitware open-source projects at <a moz-do-not-send="true"
 href="http://www.kitware.com/opensource/opensource.html"
 target="_blank">http://www.kitware.com/opensource/opensource.html</a>

Please keep messages on-topic and check the ParaView Wiki at: <a
 moz-do-not-send="true" href="http://paraview.org/Wiki/ParaView"
 target="_blank">http://paraview.org/Wiki/ParaView</a>

Follow this link to subscribe/unsubscribe:
<a moz-do-not-send="true"
 href="http://www.paraview.org/mailman/listinfo/paraview"
 target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a>
  </pre>
    </blockquote>
    <br>
    </div>
    </div>
    </div>
    <br>
_______________________________________________<br>
Powered by <a moz-do-not-send="true" href="http://www.kitware.com"
 target="_blank">www.kitware.com</a><br>
    <br>
Visit other Kitware open-source projects at <a moz-do-not-send="true"
 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
 moz-do-not-send="true" href="http://paraview.org/Wiki/ParaView"
 target="_blank">http://paraview.org/Wiki/ParaView</a><br>
    <br>
Follow this link to subscribe/unsubscribe:<br>
    <a moz-do-not-send="true"
 href="http://www.paraview.org/mailman/listinfo/paraview"
 target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
    <br>
  </blockquote>
  </div>
  <br>
</blockquote>
<br>
</body>
</html>