Python: Show Module Doc

By Xah Lee. Date: .

In terminal, type pydoc moduleName

Or in Python program call help(moduleName).

Note: the documentation from pydoc is not the same as the official documentation. Doc from pydoc is generated from the module source code, and is terse and technical.

import os

# print the module's inline doc
print(help(os))

Python: Paths and Module