[Paraview] Paraview Python best practise?
David E DeMarle
dave.demarle at kitware.com
Fri Jun 23 14:31:52 EDT 2017
On Fri, Jun 23, 2017 at 12:44 PM, Shuhao Wu <shuhao at shuhaowu.com> wrote:
> Hello,
>
> I was wondering if there are any sort of general best practise when
> writing Python based Paraview scripts for visualizations. From the
> materials I've gathered, everything feels very much like mutating a global
> state machine, which might not be the best if you want to turn certain
> actions into a library/general utility executable. What are the best
> practises in this regard?
>
>
Others can provide better advice than I on this point.
> Furthermore, is there a way to specify ProgrammableFilter not as strings
> but in a file that you import and invoke? Judging from the source code it
> doesn't appear this is an ability that comes out of the box as it just
> spins up a python interpreter with that string. I've tried to create a
> function and them execute it, but this only works under pvpython, not with
> the python shell in the Paraview GUI. What are the best practises for this,
> as well?
>
>
I find Programmable Filter script string(s) that simply execfile(...) or
import ... are convenient for this.
> Thanks,
> Shuhao
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170623/3ee25b2a/attachment.html>
More information about the ParaView
mailing list