[vtk-developers] New vtkpython.py - comments.

David Gobbi dgobbi at irus.rri.ca
Wed Oct 3 15:40:25 EDT 2001


On Wed, 3 Oct 2001, Prabhu Ramachandran wrote:

> We can surely wait but wouldn't it be painful accessing each vtk
> object via something like vtk.common.vtkBlahBlah etc. etc.?  Also,
> many times things change from one package to another.  What advantages
> does this approach give us?  Won't you still need magic code to load
> what is available at run time?

The kits would be loaded like this:

from vtk.common import *

but the classes would be accessed just like before, because they would
be imported into the global namespace.

As for the magic code that loads all available classes at run time,
we wouldn't want to get rid of it, we'd just want to give people the
option of loading the kits individually.

Right now, the have to do

from libvtkHybridPython import *

under UNIX and

from vtkHybridPython import *

under Windows.  There should be a platform-independent way to load
just a single kit.

 - David




More information about the vtk-developers mailing list