On this page you will find links to the most important pages of the Python docs. When you start programming in Python, you'll find these to be extremely useful. I look at these quite often. :-)
Important: These links are for reference only. It is assumed that you are already somewhat familiar with the Python language, i.e. you should at least have read the Python tutorial.
Note: These links point to the docs of the most recent version of Python, which might not be the version that you have. Therefore, there might be features described which are not available to you. If in doubt, upgrade to the latest official stable version of Python.
%" operator
(similar to what you can do with "printf"
in C).
sys" module. You will probably
almost always import it, because it contains things
like argv[], exit() and
stderr.
re" module for using regular
expressions. It contains several subsections, most importantly
RE Syntax,
Module Functions,
RE Objects and
Match Objects.
There's also a nice explanation how to simulate
"scanf()" using regular expressions on the
Examples
subsection.
os"
module. It contains many of the things that you usually
get from the libc, such as file and directory operations,
handling processes, environment variables etc.
os.path"
module. It contains such useful things like
basename(), exists() and
realpath(), just to name a few.
time"
module for handling and converting time and date
specifications.
*, "?" and
"[]").
shutil" module can be used for several
high-level file operations, such as copying and moving
single files or whole directory trees.
/sbin/ifconfig -a") and capturing
their output.
There are many, many more modules than the ones listed above. There are modules for debugging and profiling, automated documentation and regression testing, signal processing, socket I/O, threading, various internet protocols, writing CGI programs, parsing and producing various formats (including HTML and XML), handling of multimedia data, accessing databases, compression, encryption, textual user interfaces (à la curses) and even graphical user interfaces that can be made portable so they run under X11 as well as under MacOS and Windows. And lots more.
For an overview and extensive descriptions of all modules that come with the default Python distribution, refer to the Python Library Reference.