What does the Pydoc module do?

logan beaupre picture logan beaupre · Feb 6, 2014 · Viewed 56.9k times · Source

New to programming and python altogether. In the book I'm learning from, the author suggested I find out the purpose of Pydoc.

I did a google search on it, and found a match (from Gnome Terminal) but it didn't make much sense to me. Anyone mind simplifying a bit?

Answer

Kapil Marwaha picture Kapil Marwaha · Oct 24, 2015

Pydoc is a help / documentation module for Python.

Use this on your Windows terminal to understand what a function in python does :

python -m pydoc <function>

eg.

python -m pydoc raw_input

If the documentation for a particular function is very long, use 'q' to get out of it.

e.g. in case of

python -m pydoc Tkinter