[Paraview] Paraview Python best practise?

Shuhao Wu shuhao at shuhaowu.com
Fri Jun 23 12:44:45 EDT 2017


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?

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?

Thanks,
Shuhao


More information about the ParaView mailing list