Monday, January 25, 2010

Pydoc


Category: learn something every day.

In the Python interpreter you can do (docs):

>>> import itertools
>>> help(itertools)

and get what look like Unix man pages for the module. But I didn't know you can do:
$ pydoc -w itertools

from the command line and pydoc will write an html file to the current directory (or you can redirect). Very helpful!

No comments: