Python Standard Library

Introduction

The Python 2.0 distribution comes with an extensive standard library, comprising over 200 modules.

Python imports built-in functions and modules when it starts up, and makes their content available for all programs.

Data Types

datetime

The datetime module supplies classes for manipulating dates and times.

Generic Operating System Services

os

This module provides a portable way of using operating system dependent functionality.

time

This module provides various time-related functions.

optparse

Library for parsing command-line options.

Interprocess Communication and Networking

socket

This module provides access to Transport Layer Security (often known as “Secure Sockets Layer”) encryption and peer authentication facilities for network sockets, both client-side and server-side. This module uses the OpenSSL library.

Python Runtime Services

sys

This module provides access to some variables used or maintained by the interpreter and to functions that interact strongly with the interpreter. It is always available.

traceback

This module provides a standard interface to extract, format and print stack traces of Python programs. It exactly mimics the behavior of the Python interpreter when it prints a stack trace.

Bibliography
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.