I am curious about NaturalDocs, and want to autodocument some Python files. The files are documented using docstrings. The files are parsed perfectly using epydoc.
The sample file (/tmp/test/test.py):
def m(a, b):
"""/*
Function: m
Multiplies two integers.
Parameters:
a - The first integer.
b - The second integer.
Returns:
The two integers multiplied together.
*/"""
print a*b
return a*b
m(3,5)
I’ve tried:
$ mkdir nd
$ mkdir html
$ naturaldocs -i /tmp/test -o HTML html -p nd
Finding files and detecting changes...
Parsing 1 file...
Updating menu...
Updating CSS file...
Done.
But got empty results (html directory only has some .js files).
Is there a way to tell NaturalDocs to document my Python files without rewriting all comments?
It appears that NaturalDocs supports single line comments only in Python sources by default (lines prefixed by
#).If you don’t want to rewrite your comments you can configure NaturalDocs to accept block comments that look like your example. You start with
"""/*and end with*/""". Add the following line to the sectionLanguage: PythoninConfig/Languages.txt: