How to import pydoc and then use it?

M

mrstevegross

I know how to use pydoc from the command line. However, because of
complicated environmental setup, it would be preferable to run it
within a python script as a native API call. That is, my python runner
looks a bit like this:

import pydoc
pydoc.generate_html_docs_for(someFile)

However, it's not clear to me from the pydoc documentation which
function calls I need to use to make this behavior work. Any ideas?

Thanks,
--Steve
 
A

Albert Hopkins

I know how to use pydoc from the command line. However, because of
complicated environmental setup, it would be preferable to run it
within a python script as a native API call. That is, my python runner
looks a bit like this:

import pydoc
pydoc.generate_html_docs_for(someFile)

However, it's not clear to me from the pydoc documentation which
function calls I need to use to make this behavior work. Any ideas?

Did you try 'pydoc pydoc'? ;)
 
J

Jean-Michel Pichavant

Albert said:
Did you try 'pydoc pydoc'? ;)
By the way, just in case the OP didn't know, there is the epydoc module
(google it) which is doing basically the same things than pydoc, but
with a much better look and feel to my opinion.

JM
 

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

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,701
Latest member
XavierQ83

Latest Threads

Top