How to exclude "import"s from PyDoc

Diez B. Roggisch deets at nospam.web.de
Wed Aug 26 19:01:26 EDT 2009


Matt Bellis schrieb:
> Hi all,
> 
>   I tried PyDoc today for documentation for a small project on which
> I'm working. I have a class, foo, in foo.py. However, at the beginning
> of the file I "from math import *".
> 
>    When I use PyDoc, it's pulling in all the math functions....
> 
> ---snip---
> .
> .
> .
> FUNCTIONS
>     acos(...)
>         acos(x)
> 
>         Return the arc cosine (measured in radians) of x.
> 
>     asin(...)
>         asin(x)
> 
>         Return the arc sine (measured in radians) of x.
> 
> .
> .
> .
> ----snip----
> 
> 
>    Anyone know the best way to get PyDoc to ignore this (or other)
> imported module(s)?

Don't know about pydoc, but epydoc (which generates much nicer docs 
imho) can be forced to only include certain packages.

Diez



More information about the Python-list mailing list