1. Technology

The Python Standard Library

Python Standard Library


Python Standard Library by Example
reedwade/Flikr/CC BY 2.0

Python comes with a bevy of pre-written pieces of programming code for you to use in your programs. The individual files are called modules, and you can call all or part of a module as you need.

Here I do not discuss the entire Python library. The main Python site does this in considerable depth with its online documentation, and the Python documentation which accompanies a standard installation of Python contains the same information.

You may ask: Why is it called the Python Standard Library? The first word is obvious: It is related to Python! What is more, this library comes with every installation of Python. Therefore, it is standard. The modules themselves can be checked out and copied into your programs much like you do when using a library book.

Now, to the Library! The following are links directly to the Python discussion of some of the most common libraries used by Python programmers. If you do more sophisticated programming, you will almost certainly need other modules, but you will also use at least one or two of these.

  1. sys for system-specific functions
  2. os for functions related to the operating system
  3. re for pattern matching (i.e., regular expressions)
  4. string for manipulating strings
  5. cgi for programming the Common Gateway Interface (CGI)
  6. cgitb for troubleshooting CGI scripts in a web browser
  1. About.com
  2. Technology
  3. Python
  4. Python Library
  5. The Python Standard Library

©2014 About.com. All rights reserved.