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] |
Fred Drake | 395e8e4 | 1998-04-03 07:10:41 +0000 | [diff] [blame] | 17 | --- Class wrapper for dictionary objects. |
| 18 | |
Guido van Rossum | 1c974db | 1998-02-11 22:36:17 +0000 | [diff] [blame] | 19 | \item[UserList] |
Fred Drake | 395e8e4 | 1998-04-03 07:10:41 +0000 | [diff] [blame] | 20 | --- Class wrapper for list objects. |
Guido van Rossum | 7f3b042 | 1997-03-27 14:56:18 +0000 | [diff] [blame] | 21 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 22 | \item[operator] |
Fred Drake | 395e8e4 | 1998-04-03 07:10:41 +0000 | [diff] [blame] | 23 | --- All Python's standard operators as built-in functions. |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 24 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 25 | \item[traceback] |
| 26 | --- Print or retrieve a stack traceback. |
| 27 | |
| 28 | \item[pickle] |
| 29 | --- Convert Python objects to streams of bytes and back. |
| 30 | |
Fred Drake | 898601b | 1998-04-12 03:08:41 +0000 | [diff] [blame] | 31 | \item[cPickle] |
| 32 | --- Faster version of \module{pickle}, but not subclassable. |
| 33 | |
Fred Drake | 0f35495 | 1998-01-21 05:04:52 +0000 | [diff] [blame] | 34 | \item[copy_reg] |
Fred Drake | af0bfbe | 1998-02-18 15:39:15 +0000 | [diff] [blame] | 35 | --- Register \module{pickle} support functions. |
Fred Drake | 0f35495 | 1998-01-21 05:04:52 +0000 | [diff] [blame] | 36 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 37 | \item[shelve] |
| 38 | --- Python object persistency. |
| 39 | |
| 40 | \item[copy] |
| 41 | --- Shallow and deep copy operations. |
| 42 | |
| 43 | \item[marshal] |
| 44 | --- Convert Python objects to streams of bytes and back (with |
| 45 | different constraints). |
| 46 | |
| 47 | \item[imp] |
Fred Drake | af0bfbe | 1998-02-18 15:39:15 +0000 | [diff] [blame] | 48 | --- Access the implementation of the \keyword{import} statement. |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 49 | |
Guido van Rossum | 3317e63 | 1996-07-21 02:22:12 +0000 | [diff] [blame] | 50 | \item[parser] |
| 51 | --- Retrieve and submit parse trees from and to the runtime support |
| 52 | environment. |
| 53 | |
Guido van Rossum | 1c974db | 1998-02-11 22:36:17 +0000 | [diff] [blame] | 54 | \item[symbol] |
| 55 | --- Constants representing internal nodes of the parse tree. |
| 56 | |
| 57 | \item[token] |
| 58 | --- Constants representing terminal nodes of the parse tree. |
| 59 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 60 | \item[keyword] |
| 61 | --- Test whether a string is a keyword in the Python language. |
| 62 | |
| 63 | \item[code] |
| 64 | --- Code object services. |
| 65 | |
| 66 | \item[pprint] |
| 67 | --- Data pretty printer. |
| 68 | |
| 69 | \item[dis] |
| 70 | --- Disassembler. |
| 71 | |
Guido van Rossum | fc5ee0f | 1997-04-03 22:43:02 +0000 | [diff] [blame] | 72 | \item[site] |
| 73 | --- A standard way to reference site-specific modules. |
| 74 | |
Guido van Rossum | e084f0b | 1997-11-20 21:03:33 +0000 | [diff] [blame] | 75 | \item[user] |
| 76 | --- A standard way to reference user-specific modules. |
| 77 | |
Guido van Rossum | ecde781 | 1995-03-28 13:35:14 +0000 | [diff] [blame] | 78 | \item[__builtin__] |
| 79 | --- The set of built-in functions. |
| 80 | |
| 81 | \item[__main__] |
| 82 | --- The environment where the top-level script is run. |
| 83 | |
| 84 | \end{description} |