Documentation using PyDoc

C

Colin J. Williams

I am building a module which is based on the numarray package and its
sub-packages.

I am proposing to use PyDoc to document this module. The problem is
that PyDoc generates links to documentation on the imported modules and
expects to find HTML files in the style: nameOfImportedModule.html.

The numarray documentation is not in this style.

Is there some way that I can guide PyDoc in the generation of names to
the imported links?

Supposing I create my own links, how can I ensure that these
automatically call the appropriate node in the numarray tree?

Is there any possibility that the numarray documentation could be
generated by PyDoc?

I would appreciate any advice.

Colin W.

PS I don't see any documentation on the generic module.
 
P

Paul Clinch

I am not familiar with the numarray package, but you could tweak the pydoc code.

in fact the pydoc file contains;
class HTMLDoc(Doc):

which contains a function;
def classlink(self, object, modname):
some code ...

return '<a href="%s.html#%s">%s</a>' %
( module.__name__, name, classname(object, modname))

so "numarray.html#classname" is really what is wanted.

I guess insertion of code something like;

if module.__name__ == 'numarray':
return '<a href="numarraydoc.html#%s">%s</a>' % name, classname(object, modname)
else
...

or something else suitable.

Good luck,

Paul Clinch
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top