Python: Builtin Help

By Xah Lee. Date: . Last updated: .

This page shows you how to use the builtin help system to read python docs.

pydoc Command

In terminal type pydoc to get started. It'll print a summary of how to use it. For python 3, use pydoc3.

pydoc3 <name> ...
    Show text documentation on something.  <name> may be the name of a
    Python keyword, topic, function, module, or package, or a dotted
    reference to a class or function within a module or module in a
    package.  If <name> contains a '/', it is used as the path to a
    Python source file to document. If name is 'keywords', 'topics',
    or 'modules', a listing of these things is displayed.

Type f to page down, b to page up, q to exit.

For example, type:

help() function

Or, in terminal, start Python by python, then type help(). Type exit to exit.

Note: in Ubuntu Linux, as of , there's a bug that both pydoc modules will crash Python. Use python3 instead. sudo apt-get install python3.