[vtkusers] How to use PrintSelf() in Tcl and python?
David Gobbi
dgobbi at imaging.robarts.ca
Thu Sep 5 09:32:15 EDT 2002
I can expand on the Python part a bit,
>>> print object
or to create a string containing the info
>>> text = str(object)
and the following are also useful:
>>> object = vtkTransform()
>>> object
>>> <libvtkCommonPython.vtkTransform vtkobject at 0x8182098>
>>> repr(object)
>>> '<libvtkCommonPython.vtkTransform vtkobject at 0x8182098>'
You can also list the methods of an object using
>>> dir(object)
or list the methods of a class (just the class itself, not superclasses)
>>> dir(vtkTransform)
or get documentation for a class or class method or instance method
>>> print vtkTransform.__doc__
>>> print vtkTransform.RotateWXYZ.__doc__
Prabhu also has a GUI browser for this sort of stuff in his MayaVI
package.
- David
--
David Gobbi, MSc dgobbi at imaging.robarts.ca
Advanced Imaging Research Group
Robarts Research Institute, University of Western Ontario
On 5 Sep 2002, Andy Cedilnik wrote:
> Hi Maurice,
>
> Tcl:
>
> puts [ object Print ]
>
> Python:
>
> print object
>
> Andy
>
> On Thu, 2002-09-05 at 08:17, Maurice van de Rijzen wrote:
> > Dear all,
> > I have a very basic question.
> > What is the output of PrintSelf?
> > How do I use PrintSelf in Tcl & python scripts?
>
>
> _______________________________________________
> 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