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!

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.