Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 1 | \chapter{Python Services} |
Fred Drake | af0bfbe | 1998-02-18 15:39:15 +0000 | [diff] [blame^] | 2 | \label{python} |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 3 | |
| 4 | The modules described in this chapter provide a wide range of services |
| 5 | related to the Python interpreter and its interaction with its |
| 6 | environment. Here's an overview: |
| 7 | |
| 8 | \begin{description} |
| 9 | |
| 10 | \item[sys] |
| 11 | --- Access system specific parameters and functions. |
| 12 | |
| 13 | \item[types] |
| 14 | --- Names for all built-in types. |
| 15 | |
Guido van Rossum | 1c974db | 1998-02-11 22:36:17 +0000 | [diff] [blame] | 16 | \item[UserDict] |
| 17 | \item[UserList] |
Guido van Rossum | 7f3b042 | 1997-03-27 14:56:18 +0000 | [diff] [blame] | 18 | --- Class wrappers for dictionary and list objects. |
| 19 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 20 | \item[operator] |
| 21 | --- All python's standard operators as built-in functions. |
| 22 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 23 | \item[traceback] |
| 24 | --- Print or retrieve a stack traceback. |
| 25 | |
| 26 | \item[pickle] |
| 27 | --- Convert Python objects to streams of bytes and back. |
| 28 | |
Fred Drake | 0f35495 | 1998-01-21 05:04:52 +0000 | [diff] [blame] | 29 | \item[copy_reg] |
Fred Drake | af0bfbe | 1998-02-18 15:39:15 +0000 | [diff] [blame^] | 30 | --- Register \module{pickle} support functions. |
Fred Drake | 0f35495 | 1998-01-21 05:04:52 +0000 | [diff] [blame] | 31 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 32 | \item[shelve] |
| 33 | --- Python object persistency. |
| 34 | |
| 35 | \item[copy] |
| 36 | --- Shallow and deep copy operations. |
| 37 | |
| 38 | \item[marshal] |
| 39 | --- Convert Python objects to streams of bytes and back (with |
| 40 | different constraints). |
| 41 | |
| 42 | \item[imp] |
Fred Drake | af0bfbe | 1998-02-18 15:39:15 +0000 | [diff] [blame^] | 43 | --- Access the implementation of the \keyword{import} statement. |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 44 | |
Guido van Rossum | c4452fd | 1998-02-11 22:32:23 +0000 | [diff] [blame] | 45 | \item[ni] |
| 46 | --- New import (obsolete). |
| 47 | |
Guido van Rossum | 3317e63 | 1996-07-21 02:22:12 +0000 | [diff] [blame] | 48 | \item[parser] |
| 49 | --- Retrieve and submit parse trees from and to the runtime support |
| 50 | environment. |
| 51 | |
Guido van Rossum | 1c974db | 1998-02-11 22:36:17 +0000 | [diff] [blame] | 52 | \item[symbol] |
| 53 | --- Constants representing internal nodes of the parse tree. |
| 54 | |
| 55 | \item[token] |
| 56 | --- Constants representing terminal nodes of the parse tree. |
| 57 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 58 | \item[keyword] |
| 59 | --- Test whether a string is a keyword in the Python language. |
| 60 | |
| 61 | \item[code] |
| 62 | --- Code object services. |
| 63 | |
| 64 | \item[pprint] |
| 65 | --- Data pretty printer. |
| 66 | |
| 67 | \item[dis] |
| 68 | --- Disassembler. |
| 69 | |
Guido van Rossum | fc5ee0f | 1997-04-03 22:43:02 +0000 | [diff] [blame] | 70 | \item[site] |
| 71 | --- A standard way to reference site-specific modules. |
| 72 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 73 | \item[user] |
| 74 | --- A standard way to reference user-specific modules. |
| 75 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 76 | \item[__builtin__] |
| 77 | --- The set of built-in functions. |
| 78 | |
| 79 | \item[__main__] |
| 80 | --- The environment where the top-level script is run. |
| 81 | |
| 82 | \end{description} |