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

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Oct 5 16:39:33 EDT 2001


hi,

Thanks for the work on the Tcl stuff!  Although I dont use Tcl, I know
that you folks had a hard time getting it done "right".  Thanks for
the feedback.  Thanks also for the work on the documentation stuff.

>>>>> "SB" == Sebastien BARRE <sebastien at barre.nom.fr> writes:

    SB> At 10/6/2001 01:17 AM, Prabhu Ramachandran wrote:
    >> That about covers it.  Suggestions are welcome.

    SB> Sure. I guess it would be good if we could have a structure
    SB> similar in both Tcl and Python, so that users can switch from
    SB> one to the other.

Yes, but there will be minor differences i guess.  Most important of
which is the way in which packages are accessed.  Right now I am
thinking of the traditional Python way where you move through packages
with a '.'  so its vtk.common, vtk.rendering, vtk.whatever and not
vtkcommon, vtkrendering etc.  I dont think this makes too much of a
difference.

    SB> So there it is again for Tcl users:

    SB> a) package require vtk

    SB> loads everything needed (it's your point 2b), i.e. all VTK
    SB> components (and only these one, nothing else).

Okay not a problem.

    SB> b) on the other hand:

    SB>          package require vtkimaging

    SB> can be used for example to load only these VTK commands needed
    SB> to run the Imaging component (you can use vtkcommon,
    SB> vtkfiltering, vtkhybrid, etc.). I guess it's your point 2d.

Umm. We had a long discussionon this and I think I managed to convince
(or badger? ;) Dan into agreeing with me. :) So I wont go into it
again.  But I think we will differ here from what is done for Tcl.

    SB> c) the additional :

    SB>          package require vtkinteraction

    SB> is used to loaded everything needed to enhance interaction,
    SB> for example load the defaults bindings for the Tk render
    SB> widgets as well as the default Tcl command interactor. I
    SB> definitely think you could use that name for your point j.

Okay, I guess this is the equivalent of the widget directory I
mentioned.  What do others feel about this naming convention?  Do we
also name the wiget related directory interaction?  The problem I have
here is though this is interaction, Python can deal with other
toolkits like GTK, wxPython etc.  I am not sure if Tcl is used with
anything else?

    SB> d) the additional :

    SB>          package require vtktesting

Ok.  So we have a choice between test, tests and testing.  Testing
sounds good.

from vtk.testing import *

But your points lead me to an entirely different approach i.e. not
using a package directory.

Wrapping/Python/
  vtk.py
  vtkcommon.py
  ... other required kits
  vtkrendering.py
  ... other optional kits
  vtktesting/
  vtkinteraction/


I have to think more about this.  What do you folks think?  Do we
vote??

prabhu



More information about the vtk-developers mailing list