Python comes with a "pydoc" utility. On windows it is lacated in C:\Python2X\Lib (you may want to add this directory to your system path)
To produce an html documentation of a script or module type in a DOS shell (at the level of your script) :
pydoc.py -w nameOfYourScript
- don't type the .py extension in the command above
- respect the uppercase and small caps even on windows.
- your script must have some docstrings
The above command produce a nameOfYourScript.html doc with the classes, methods, functions, etc.
For a more powerful and complete alternative I use the excellent Epydoc that you can download here:
On windows after the installation you can find the epydoc script in C:\Python2X\Scripts (you may want to add this directory to your system path)
To use epydoc just type in a shell in the folder containing your script(s):
This will produce an "html" folder : read the index.html in your browser and enjoy :)
jeudi 11 janvier 2007