Python Documentation


External Links

Here are some links to Python documentation on the web, but before you branch off and explore these sources read the next section about the help that is available from within python itself.

Python Integrated Help

Python comes with very comprehensive built-in documentation. This is in two kinds. There is the integrated modal sub-system invoked by typing help() at the command line, and there is information about programming elements available from the interpreter itself by typing in python commands such as dir(object). The next section covers the Help sub-system mode.

When you start the python interpreter it displays three lines of information followed by the standard python command prompt

Python 3.8.8+ (riscos-1, Feb 22 2021, 21:48:54)
[GCC 4.7.4] on riscos
Type "help", "copyright", "credits" or "license" for more information.

How to Inspect the contents of a library module

use help(modulename) gives formatted output help(sys) use dir built-in function import sys dir(sys) # shows names defined by sys dir(math) # shows names defined by math or dir() # shows names I have defined use inspect similar to dir but more options import inspect help(inspect)

© 2021 JR