← Back to team overview

dolfin team mailing list archive

autogenerated docstrings

 

Hello!

I have added a script that generate swig interface files with docstrings. The 
docstrings is extracted from doxygen produced xml documentation, so doxygen 
needs to be installed. The script generate.py needs to be run before 
compilation, as previously.

The script is based on another script made by Prabhu Ramachandran, the 
developer of MayaVi.

The result is quite nice.

>>> from dolfin import UnitSquare

>>> print UnitSquare.__doc__

    Triangular mesh of the 2D unit square (0,1) x (0,1). Given the number
    of cells (nx, ny) in each direction, the total number of triangles
    will be 2*nx*ny and the total number of vertices will be (nx + 1)*(ny
    + 1).

    C++ includes: UnitSquare.h


>>> print UnitSquare.numCells.__doc__

        numCells(self) -> uint

        Return number of cells.

I have included a change set in a bundle, if the feature is of interest. I 
hope it gets through, its 21 KB.


Johan

Attachment: dolfin-docstrings-20070920.hg
Description: Binary data


Follow ups