Hi all!
I have started using pydoc and can not figure it all out...
I have made packages in a structure like:
(supposed to look like a dir structure, hope you see what I mean)
If my working dir is dir that contains pkg1 dir I use command:

pydoc -w pkg1

That gives me a html called pkg1.html that shows me that there is a subpackage named pkg2 that is a href, this href point to pkg1.pkg2.html in the same dir. This page does not exists and is never created by pydoc.
Isn't pydoc supposed to work similar to javadoc?
If I point to the package pkg1 isn't pydoc supposed to create html files for modules, submodules and subpackages as well?
Am I supposed to make the hrefs right by my self and run pydoc command in every package?
I think that I am missing something or isn't this functionality included in pydoc?

Many, many thanks for the help!

8 Years
Discussion Span
Last Post by Gribouillis

In fact, if you issue the command pydoc -w pkg1.pkg2 , it will generate your pkg1.pkg2.html . After pydoc -w , you must not put the path of a file or a directory, but the module path of a python module as if you were importing it in python with import pkg1.pkg2 . Now I'm affraid you will have to write a small python script to find the hierarchy of modules which are accessible from pkg1. I think there are reasons why this is not implemented. Note that to generate the doc of a module, pydoc must import the module, but suppose that a file is called "foo.py". It can be a module "foo", or it could be a script which erases the content of your family photo album. So it shouldn't be run without some care...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.