[Paraview] Extending PythonManager to execute script from memory buffer rather than file (patch supplied)

Pat Marion pat.marion at kitware.com
Fri Sep 14 14:35:47 EDT 2012


Hi Ian,

I added a note to the mantis issue.

I believe that it is already possible to execute python code from a string
(instead of a file) like this:

#include "pqPythonShell.h"
#include "pqPythonDialog.h"

pythonManager()->pythonShellDialog()->shell()->executeScript("print 'hello
world!'");

Pat


On Fri, Sep 14, 2012 at 11:03 AM, Ian Curington <ianc at acm.org> wrote:

> I would like to request Extending pqPythonManager to execute pvpython from
> memory buffer rather
> than   exlusively   from  an  external  file  (patch  supplied  as  at
> http://paraview.org/Bug/view.php?id=13456 ).
>
> Why? Within other plugins, filters, C++ programs, can be helpful to
> execute some small script.
> Currently, such small script must first be written to file, then executed,
> then removed.
>
> I'd like to ask for comments, if this seems a good idea or not, - I've
> found it helpful in custom plugin development.
>
> --
> Best regards,
>  Ian                            mailto:ianc at acm.org
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120914/447aec27/attachment.htm>


More information about the ParaView mailing list