pydoc - how to generate documentation for an entire package?

Discussion in 'Python' started by Jens, Nov 8, 2007.

  1. Jens

    Jens Guest

    I have a project/package for which I want to generate documentation
    using pydoc.

    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?
     
    Jens, Nov 8, 2007
    #1
    1. Advertisements

  2. Jens

    Jens Guest

    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?
     
    Jens, Nov 19, 2007
    #2
    1. Advertisements

  3. Epydoc!?

    Ciao,
    Marc 'BlackJack' Rintsch
     
    Marc 'BlackJack' Rintsch, Nov 20, 2007
    #3
  4. Jens

    davisn90210 Guest

    pydoc -h

    [...]

    pydoc -w <name> ...
    Write out the HTML documentation for a module to a file in the
    current
    directory. If <name> contains a '/', it is treated as a filename;
    if
    it names a directory, documentation is written for all the
    contents.

    Have you tried pydoc -w <directory-containing-package>?

    --Nathan Davis
     
    davisn90210, Nov 20, 2007
    #4
  5. Jens

    Jens Guest

    Yes, I have! It just generates a single html file. It just contains a
    lot of broken links to non-existing module files. Strange!
     
    Jens, Nov 20, 2007
    #5
  6. Jens

    Jens Guest

    Thanks! Epydoc looks promising - shame about the user interface
    though :-(
     
    Jens, Nov 20, 2007
    #6
  7. Jens

    kirillrd Guest

    There is also happydoc , much less features , but still nice :)
     
    kirillrd, Dec 19, 2007
    #7
  8. I like apydia <http://apydia.ematia.de/>


    Florian
     
    Florian Diesch, Dec 20, 2007
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.