Печать

Справочная система pydoc доступна только в операционных системах семейства UNIX (Linux и др.). Pydoc автоматически генерирует документацию из Python модулей.

Pydoc из Python 2.7 запускается в командной строке командой pydoc, из Python 3 - командой pydoc3.

pydoc3
pydoc - the Python documentation tool

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.

pydoc3 -k <keyword>
    Search for a keyword in the synopsis lines of all available modules.

pydoc3 -p <port>
    Start an HTTP server on the given port on the local machine.  Port
    number 0 can be used to get an arbitrary unused port.

pydoc3 -b
    Start an HTTP server on an arbitrary unused port and open a Web browser
    to interactively browse documentation.  The -p option can be used with
    the -b option to explicitly specify the server port.

pydoc3 -w <name> ...
    Write out the HTML documentation for a module to a file in the current
    directory.  If <name> contains a '/', it is treated as a filename; if
    it names a directory, documentation is written for all the contents.

С помощью команды pydoc можно получить справку в командной строке, а можно запустить локальный WEB-сервер и пользоваться справочной системой в браузере.

pydoc3 -p8080
Server ready at http://localhost:8080/
Server commands: [b]rowser, [q]uit
server> b
server>