[Paraview] missing python filters from python Shell

Ben Boeckel ben.boeckel at kitware.com
Thu Mar 20 14:35:52 EDT 2014


On Wed, Mar 19, 2014 at 16:55:21 -0400, David E DeMarle wrote:
> Try this technique from Pat Marion.
>   http://markmail.org/message/4kp7cxl2ani25cak
> It should give you access to most or all of VTK, not just the subset the
> ParaView exposes.

For those who would like to avoid 'exec', here's the equivalent using
__import__:

    m = __import__('paraview.vtk.%s' % moduleName, globals(), locals())
    try:
        attrlist = m.__all__
    except AttributeError:
        attrlist = dir(m)
    for attr in attrlist:
        globals()[attr] = getattr(m, attr)

It doesn'appear that VTK sets __all__, so that should be able to be
removed.

--Ben


More information about the ParaView mailing list