[vtk-developers] Current vtkpython test code.

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Sep 21 14:32:52 EDT 2001


hi,

I cleaned up a little of the testing code.  It is still nowhere near
complete but it works okay and doesnt have any backward compatibility
checks etc.  All the code does right now is the following:

  (a) It obviously has to import vtkpython!

  (b) It instantiates all possible vtkPython classes (except the ones
  that segfault).

  (c) Parses all the methods of the various classes.

That is it.  I will add the other stuff in later - most probably next
weekend.  There are a few classes in the vtkMethodParser.py file but
only the vtkDirMethodParser is used.  I have kept the others for
future use and may delete them once I do some more work on them.  The
other problem is that right now you need to run the code, redirect the
output, and look at the messages to see what is happening - there is a
ton of output.  Try the following and choose the best approach.

$ python test_vtkpython.py &> err.log

This redirects everything to the err.log file.

$ python test_vtkpython.py 2> vtk-err.log 1> err.log

The above actually produces nicer looking output with all the vtk
errors and warnings etc. going into vtk-err.log and all the
test_vtkpython messages going into err.log.

On my PIII 450Mhz desktop this code takes about 15 seconds to run.

$ time python test_vtkpython.py 2> vtk-err.log 1> err.log

real    0m15.402s
user    0m15.100s
sys     0m0.160s
$

Attached below are two python files - vtkMethodParser.py and
test_vtkpython.py.  Put them in the same directory, make sure
vtkpython is accessible and run it.

prabhu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMethodParser.py
Type: application/octet-stream
Size: 16505 bytes
Desc: vtkMethodParser.py
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20010922/545752b6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_vtkpython.py
Type: application/octet-stream
Size: 5885 bytes
Desc: test_vtkpython.py
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20010922/545752b6/attachment-0003.obj>


More information about the vtk-developers mailing list