how to create module documentation: gendoc? pythondoc? other?

Jeff McCarrell jwm at
Tue Jun 3 07:18:01 CEST 2003

Hi.  The python faq says to use Daniel's gendoc utility to create
module documentation from doc strings.

Daniel's site ( says
gendoc is no longer being developed and to use pythondoc instead.

When I run pythondoc on itself (using 2.2.2), I get deprecation
about regex and regsub (annoying, but not fatal),
and a fatal error:

gobi-> python -f HTML4 -i -d /tmp/html pythondoc
  (deprecations elided)
Traceback (most recent call last):
  File "", line 2, in ?
    import pythondoc.pythondoc
  File "", line 66, in ?
    import docobjects, formatters, xref, options, stdmarkup, message,
  File "xref\", line 1, in ?
    import xref
  File "xref\", line 28
    exec "import %s" % py_module
SyntaxError: unqualified exec is not allowed in function 'main' it
contains a nested function with free variables

What is the preferred method to autogenerate module documentation
these days?

-- jeff

More information about the Python-list mailing list