[vtkusers] vtk and python..

David Gobbi dgobbi at irus.rri.ca
Wed Nov 28 13:44:29 EST 2001


The python wrappers are pretty solid, but there are fewer examples than
for tcl.  In many ways C++ is much more similar to python than to tcl,
since python has classes and has a familiar syntax.

For example, tcl has no equivalent to "NULL" and null pointers pop up
now and then in VTK.  In python, there is a natural equivalence between
"NULL" and "None", whereas the tcl wrappers translate NULL to the
empty string "", so there is no way in tcl to tell the difference
between an empty string and NULL (and sometimes the difference is
important).

Furthermore, python is a typed language, tcl has no types.  Python
lists are much easier to deal with than tcl lists.  In general,
tcl is suitable for building short scripts but I don't think it is
very suitable for building applications (because of its lack of types
and its lack of object-orientedness).  Python can be used for both.

--
  David Gobbi, MSc                       dgobbi at irus.rri.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Wed, 28 Nov 2001, K.R.Subramanian wrote:

>
> I am considering using python with vtk for a course I am teaching next semester.
> I would like to hear experiences as regards this - is this quite mature and reliable
> for use in academic courses. Definitely tcl is.. Any problems?
>
> Thanks.
>
>     -- krs
>
> --
> K.R.Subramanian                        Phone: (704) 687-4872
> Department of Computer Science         FAX:   (704) 687-4893
> UNC Charlotte, CARC 311                Email: krs at cs.uncc.edu
> Charlotte, NC 28223-0001               Web: http://www.cs.uncc.edu/~krs
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list