[Tutor] automatically generate python/pylons documentation

Kent Johnson kent37 at tds.net
Sun Oct 19 06:54:35 CEST 2008


On Sat, Oct 18, 2008 at 10:52 PM, Arun Tomar <tomar.arun at gmail.com> wrote:

> creating a __init__.py file does the trick but not completely.
>  epydoc helloworld
> +-----------------------------------------------------------------------------------------------------------------------
> | In /tmp/helloworld/setup.py:
> | Import failed (but source code parsing was successful).
> |     Error: SystemExit: usage: (imported) [global_opts] cmd1
> [cmd1_opts] [cmd2 [cmd2_opts] ...]
> |               or: (imported) --help [cmd1 cmd2 ...]
> |               or: (imported) --help-commands
> |               or: (imported) cmd --help
> |
> |            error: no commands supplied (line 30)

By default epydoc imports all the modules it is documenting. This may
give errors, if the Python path is not set correctly for dependent
imports to work, and it may cause side effects, if the modules have
code that executes on import.

The --parse-only switch tells epydoc to forgo the import and just
parse the input.

Kent


More information about the Tutor mailing list