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 do (except that it is from the menu, but it's the same idea).

The solution I used was to do a search-and-replace on the python script string to put values returned from the dialog directly into the python script before running it.


You mean that you modify directly the python script from C++ code before running it ?
So it is not possible to pass directly arguments to the python script ? If it is not possible, it would be indeed a solution.
Another one would to create a temporary file which contains the arguments (in C++ code), and then read this file from the python script (I think it must be easier than modify directly the python script...)

Thank you for your answers.

Jérôme

<<attachment: jerome_plumecoq.vcf>>

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to