Hi !
I'm new two ParaView and I have one question :
I would like to launch a script shell directly from a button (whitout
opening the script shell). So I have implemented a plugin which adds a
new menu (*), and hence I can launch a python script using pqPythonManager
and runScript() from pqPy
You can use the --script option.
--script=opt Set a python script to be evaluated on startup.
e.g.
> ./paraview --script=/tmp/foo.py
Utkarsh
2010/5/6 Jérôme Plumecoq :
> Hi !
>
> I'm new two ParaView and I have one question :
>
> I would like to launch a script shell directly from a
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.
-Eric
On May 6, 2010, at 9:32 AM, Utkarsh Ayachit wrote:
> You can use the --script option.
>
> --script=opt Set a pyth
To pass command options to the script, then you could set your arguments in
sys.argv before calling the script.
import sys
sys.argv = ['script.py', 'arg1', 'arg2']
execfile('script.py')
Pat
On Thu, May 6, 2010 at 9:36 AM, Eric E. Monson wrote:
> I think he meant that he wants to pass arguments
Hey Jérôme,
I don't know if this will be helpful to you, but I wrote a plugin (a long time
ago, using an older API) that added a toolbar button which popped up a dialog
and then ran a python script. The solution I used was to do a
search-and-replace on the python script string to put values ret
Yes, indeed, I want to pass arguments to the python script, not run a
script when launching paraview.
Le 06/05/2010 15:38, pat marion a écrit :
To pass command options to the script, then you could set
your arguments in sys.argv before calling the script.
import sys
sys.argv = ['script.py',
Use pqPythonDialog::runString(const QString& script). Calling
pqPythonDialog::runString("execfile('script.py')") is the same as calling
pqPythonDialog::runScript(QStringList("script.py")).
Pat
2010/5/6 Jérôme Plumecoq
> Yes, indeed, I want to pass arguments to the python script, not run a
> s
Le 06/05/2010 16:01, Eric E. Monson a écrit :
Hey Jérôme,
I don't know if this will be helpful to you, but I wrote a
plugin (a long time ago, using an older API) that added a toolbar
button which popped up a dialog and then ran a python script.
Yes it's exactly what I would like to d
It works fine ! :-)
Thank you very much !
Jérôme
Le 06/05/2010 16:09, pat marion a écrit :
Use pqPythonDialog::runString(const QString& script).
Calling pqPythonDialog::runString("execfile('script.py')") is the same
as calling pqPythonDialog::runScript(QStringList("script.py")).
Pat