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

2012-09-14 Thread Pat Marion
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  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,
>  Ianmailto:i...@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
>
___
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


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

2012-09-14 Thread Ian Curington
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,
 Ianmailto:i...@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