[Paraview] Embedding Python source as Modules And Python Programmable Filter
Felipe Bordeu
felipebordeu at gmail.com
Mon Sep 5 05:02:25 EDT 2016
Hi,
I have a home made plugin and I have some python code to do post
processing. Now I want to embed this pythons routines in my plugin (using
the Embedding Python Source As Modules of
http://www.paraview.org/Wiki/ParaView/Plugin_HowTo). this work great, if I
open a python console (using the GUI) and then typing the "import mymodule"
I can access my routines.
Now I want to use this routines in a programmable filter. The problem is
that my module is no available directly in the python environnement of the
python programmable sources.
For the moment I have to do this (reload my plugin inside the programmable
filter):
Script of the programmable filter:
from paraview.simple import servermanager
servermanager.LoadPlugin('libZ7ToolsNative.so')
import zsetpythonpostpro
zsetpythonpostpro.CalcPostQuantitiesFromSigma(self)
for the moment this work but, the "LoadPlugin('...) line takes about 3
seconds every time (and my routine less than 1 s).
Working in linux with paraview 5.0.0 (gcc, 64-bits) from sources.
Any ideas of how to solve this issue.
Thanks
Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160905/28835711/attachment.html>
More information about the ParaView
mailing list