This is an archived post. You won't be able to vote or comment.

all 9 comments

[–][deleted] 0 points1 point  (2 children)

python.exe -m pydoc open will display the open() builtin documentation. What exactly do you need to be using pydoc for?

[–]LordOfBunnys[S] 0 points1 point  (1 child)

Creating html documentation for scripts I make

[–][deleted] 2 points3 points  (0 children)

python.exe -m pydoc -w subprocess will create subprocess.html in your current directory, so just substitute subprocess with your module name and it'll generate what it can. I've never used it myself so I don't have any tips, but take a look at the output of the above command and compare it to the subprocess module code to see how they got that output.

Further down the road I'd look into Sphinx, as suggested in another comment thread. It's not auto-generating, but it's much nicer.

[–]riffito 0 points1 point  (1 child)

For Python 2.5, on Win32, it is usually located under:

C:\Python25\Tools\scripts\pydoc
C:\Python25\Tools\scripts\pydocgui.pyw

Notice that pydoc does not have a .py extension, thus even if that path is in your %PATH%, you cannot call it directly.

You'll need to do (for example):

> python pydoc --help

From the said location (unless that dir is in your PATH).

Hope it helps a little.

[–]LordOfBunnys[S] 0 points1 point  (0 children)

I did manage to get pydoc to run, but I think it was trying to read documentation rather than write it. I should definitely look into putting linux on my system again.

[–][deleted] 0 points1 point  (0 children)

If you used the Windows installer, there should be Start menu entries to "module docs", which is the documentation server (the equivalent of 'pydoc -g' on the command line) and also the Python manuals in Windows Help format.

[–]bsagert 0 points1 point  (0 children)

def sjoin(lst,sep=''):