pydoc - how to generate documentation for an entire package?
j3nsby at gmail.com
Tue Nov 20 16:46:54 CET 2007
On 20 Nov., 08:20, "davisn90... at gmail.com" <davisn90... at gmail.com>
> On Nov 19, 12:50 pm, Jens <j3n... at gmail.com> wrote:
> > On 8 Nov., 02:46, Jens <j3n... at gmail.com> wrote:
> > > I have a project/package for which I want to generate documentation
> > > usingpydoc.
> > > My problem is that when I type "pydoc.py -w MyPackage" it only
> > > generates documentation for the package - no modules, classes or
> > > methods or sub-packages. Just a single HTML file called
> > > "MyPackage.html"
> > > That's strange - is there something here I'm missing. How do you
> > > generate documentation for a whole package?
> > No suggestions? All I can think of is to make a *.bat file on Windows
> > to call pydoc.py for each of my modules. Seems like a silly solution.
> > Also, when I have a module that imports from math (for example),
> > pydoc.py generates a broken link to the math module. This just seems
> > very silly.
> > Generating documentation form code is a nice thing, but this pydoc.py
> > is driving me insane - isn't there are better way?
> pydoc -h
> pydoc -w <name> ...
> Write out the HTML documentation for a module to a file in the
> directory. If <name> contains a '/', it is treated as a filename;
> it names a directory, documentation is written for all the
> Have you tried pydoc -w <directory-containing-package>?
> --Nathan Davis
Yes, I have! It just generates a single html file. It just contains a
lot of broken links to non-existing module files. Strange!
More information about the Python-list