Hi,
it's very difficult for me to use the VTK writer, since it has no documentation about the input format:
""" def write( self, filename, mesh, out = None ):
fd = open( filename, 'w' )
fd.write( vtk_header % op.basename( sys.argv[0] ) )
"""
this is very difficult to use. Robert, what do you think about using a similar scheme to document things like here:
http://certik.github.com/python-theora/
in particular, look for example here:
http://certik.github.com/python-theora/module_theora.html#theora.Theora.aspe...
how each method is documented. Basically the trick is that first you need to execute one script, that downloads test video files. Then you can access those files like:
t = Theora(test_files[2])
see the doctest. So in sfepy the simple script would first calculate some results and save it to probably vtk files (maybe others too). Then you would test them in the doctests. Also I must say I quite like to always import everything in the docstring explicitly, because you can then just copy & paste it to a python session and it is guaranteed to work. (as opposed to assume that the current file is imported by default, because it's not clear to the user how to import it).
I plan to get a similar thing working for hermes2d too soon.
Ondrej
participants (2)
-
Ondrej Certik
-
Robert Cimrman