[Bf-python] Automatic documentation : ) !

Willian Padovani Germano wgermano at ig.com.br
Mon Jun 16 06:13:29 CEST 2003


Hi,

There is a newer python documenting system that we can use : ). I'm
attaching an example of what it did with the Camera module.

The advantage of this program, called epydoc, is that it's not
restricted to documenting modules that the Python Interpreter can
access.  Epydoc can document any .py file, so all we have to do is to
write fake module / type definition files, with only class / function
declarations and the docstrings.

The output is great, much better than the one used for the 2.25 API,
imho.  It has tree views, frame / no frame, help, links, index, etc. 
Plus six builtin css styles.  I used the default, white, blue and black.
It's also easy to add text sections, so we can make the pages as
informative and friendly as we want to.

I'm also attaching the Camera.py file parsed to write the documentation.

The link to epydoc on sourceforge is at the end of each generated html
page.  The command to produce the docs was simply: "epydoc Camera.py".

One more thing: it generates two copies, on public and one private, but
we don't have private (like _myvar) variables, so it would be good to
find a simple way to get only the public dir.  I didn't find a flag to
control this, but if necessary we can ask the developers to provide one,
or send them a patch.

One more thing: remember that we still need doc strings in the .[ch]
files, since those are the ones that appear in a Python session.

So, what do you say?

--
Willian, wgermano at ig.com.br
-------------- next part --------------
A non-text attachment was scrubbed...
Name: html.tgz
Type: application/x-gzip
Size: 20480 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20030616/ec1cabbc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Camera.py
Type: text/x-python
Size: 4154 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20030616/ec1cabbc/attachment.py>


More information about the Bf-python mailing list