An important part of becoming “good” at a language is becoming familiar with its library eco-system.
The official Python Standard Library reference manual rocks.
Module | Category | Description |
---|---|---|
argparse | functions for parsing command line arguments | |
atexit | allows you to register functions for your program to call when it exits | |
bisect | bisection algorithms for sorting lists (see Chapter 10) | |
calendar | a number of date-related functions | |
codecs | functions for encoding and decoding data | |
collections | a variety of useful data structures | |
concurrent | asynchronous computation | |
copy | functions for copying data | |
csv | functions for reading and writing CSV files | |
datetime | classes for handling dates and times | |
fileinput | file access | iterate over lines from multiple files or input streams |
fnmatch | functions for matching Unix-style filename patterns | |
glob | functions for matching Unix-style path patterns | |
io | functions for handling I/O streams and StringIO, which allows you to treat strings as files. | |
json | functions for reading and writing data in JSON format | |
logging | access to Python’s own built-in logging functionality | |
multiprocessing | allows you to run multiple subprocesses, while providing an API that makes them look like threads | |
operator | functions implementing the basic Python operators, instead of writing your own lambda expressions | |
os | swiss army knife | access to basic OS functions |
pprint | data types | data pretty printer |
random | functions for generating pseudorandom numbers | |
re | regular expression functionality | |
sched | an event scheduler without using multithreading | |
select | access to the select() and poll() functions for creating event loops | |
shutil | file access | access to high-level file functions |
signal | functions for handling POSIX signals | |
tempfile | file access | functions for creating temporary files and directories |
threading | access to high-level threading functionality | |
urllib | provides functions for handling and parsing URLs | |
uuid | allows you to generate Universally Unique Identifiers (UUIDs) |