[vtkusers] vtk and python - some questions.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Thu Nov 9 03:44:57 EST 2000


hi,

>>>>> "David" == David Gobbi <dgobbi at irus.rri.on.ca> writes:

    David> On Thu, 9 Nov 2000, Prabhu Ramachandran wrote:
    >>  Wow! and thanks a ton!!  I really appreciate your efforts.

    David> It actually didn't take as long as I expected, a day and a
    David> half of my weekend.

Glad to hear that. :)
 
<snip>
    >>  Having complained about the python bindings, I, for my part,
    >> have figured out how to use py_cpp, and actually have managed
    >> to wrap (with a TON of help from the py_cpp developer - David
    >> Abrahams) the vtkObject class.  There were and still are a few
    >> issues with vtk's reference counting and python's.  I have a
    >> small fix but more on that later.

    David> You're lucky that he doesn't get grouchy as easily as I do
    David> ;)

I didnt think you got grouchy.  I made a fairly strong remark
("... the vtk bindings for python are far from perfect"), and it must
have hit you where you had a soft corner. ;) Maybe I got too grouchy
myself?

<snip>
    >> not really the same as having a true class, because there's no
    >> way for the user to override a method of the extension type
    >> which is called from the extension module. ..."

    David> I've thought of ways that this could be done, by deriving a
    David> special C++/Python class for each underlying C++ class and
    David> adding a static Python wrapper method to the class for each
    David> C++ method (plus add code to deal with ivars), but the way
    David> I've imagined it it would require much more wrapper code
    David> than the current wrappers.  Already, there is 50% more
    David> python wrapper code than there is VTK code!  Maybe py_cpp
    David> uses a smarter method that is more efficient.

It uses templates, heavily.  Lines of code reqd. to wrap are smaller
but I dont know about compilation times.  Actually, with 600 classes
to wrap I dont even know if things will go as I hope.

<snip>
    >> (using the stuff in wrap/ and python).  Hopefully, if
    >> everything goes well, I will have something to really shout
    >> about in a few weeks. :)

    David> Well, keep going!  There are going to be plenty of people
    David> who will want to use it.

Thanks.

    >> David, thanks for all your efforts.  I really appreciate it.
    >> My present work on py_cpp is not to dampen your spirits or
    >> compete with your efforts.  It is unlikely that the first
    >> py_cpp based wrapping will be anywhere as good as the current
    >> python bindings but this is my shot at getting the best
    >> possible python wrappers for vtk.

    David> What's wrong with a little competition ;) I'll continue
    David> working on the current python wrappers until I decide that
    David> they're obsolete.

Good.  I may need some help, if I do I will let you know.

prabhu 

p.s. Please don't cc me in on replies.  I am on the vtk users list.




More information about the vtkusers mailing list