stubgen(1) Generate draft stubs for Python modules.


usage: stubgen [--py2] [--no-import] [--doc-dir PATH]
[--search-path PATH] [-p PATH] MODULE ...

Generate draft stubs for modules.

Stubs are generated in directory ./out, to avoid overriding files with manual changes. This directory is assumed to exist.


run in Python 2 mode (default: Python 3 mode)
don't import the modules, just parse and analyze them (doesn't work with C extension modules and doesn't respect __all__)
--doc-dir PATH
use .rst documentation in PATH (this may result in better stubs in some cases; consider setting this to DIR/Python-X.Y.Z/Doc/library)
--search-path PATH
specify module search directories, separated by ':' (currently only used if --no-import is given)
use Python interpreter at PATH (only works for Python 2 right now)
-h, --help
print this help message and exit