<p>I like Doxygen to create documentation of C or PHP code. I have an upcoming Python project and I think I remember that Python doesn't have <code>/* .. */</code> comments, and also has its own self-documentation facility which seems to be the pythonic way to document.</p>
<p>Since I'm familiar with Doxygen, how can I use it to produce my Python documentation? Is there anything in particular that I need to be aware of?</p>

This is
documented on the doxygen website
, but to summarize here:
You can use doxygen to document your Python code. You can either use the Python documentation string syntax:
```
```
"""@package docstring
Documentation for this module.

More details.
"""

def func():
    """Documentation for a function.

    More details.
    """
    pass
```
```
In which case the comments will be extracted by doxygen, but you won't be able to use any of the
special doxygen commands
.
Or
you can (similar to C-style languages under doxygen) double up the comment marker (
```
#
```
) on the first line before the member:
```
```
## @package pyexample
#  Documentation for this module.
#
#  More details.

## Documentation for a function.
#
#  More details.
def func():
    pass
```
```
In that case, you can use the special doxygen commands. There's no particular Python output mode, but you can apparently improve the results by setting
```
OPTMIZE_OUTPUT_JAVA
```
to
```
YES
```
.
Honestly, I'm a little surprised at the difference - it seems like once doxygen can detect the comments in ## blocks or """ blocks, most of the work would be done and you'd be able to use the special commands in either case. Maybe they expect people using """ to adhere to more Pythonic documentation practices and that would interfere with the special doxygen commands?