1995-03-28 09:35:14 -04:00
|
|
|
\chapter{Python Services}
|
1998-02-18 11:39:15 -04:00
|
|
|
\label{python}
|
1995-03-28 09:35:14 -04:00
|
|
|
|
|
|
|
The modules described in this chapter provide a wide range of services
|
|
|
|
related to the Python interpreter and its interaction with its
|
|
|
|
environment. Here's an overview:
|
|
|
|
|
|
|
|
\begin{description}
|
|
|
|
|
|
|
|
\item[sys]
|
|
|
|
--- Access system specific parameters and functions.
|
|
|
|
|
|
|
|
\item[types]
|
|
|
|
--- Names for all built-in types.
|
|
|
|
|
1998-02-11 18:36:17 -04:00
|
|
|
\item[UserDict]
|
1998-04-03 03:10:41 -04:00
|
|
|
--- Class wrapper for dictionary objects.
|
|
|
|
|
1998-02-11 18:36:17 -04:00
|
|
|
\item[UserList]
|
1998-04-03 03:10:41 -04:00
|
|
|
--- Class wrapper for list objects.
|
1997-03-27 10:56:18 -04:00
|
|
|
|
1997-11-20 17:03:33 -04:00
|
|
|
\item[operator]
|
1998-04-03 03:10:41 -04:00
|
|
|
--- All Python's standard operators as built-in functions.
|
1997-11-20 17:03:33 -04:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\item[traceback]
|
|
|
|
--- Print or retrieve a stack traceback.
|
|
|
|
|
|
|
|
\item[pickle]
|
|
|
|
--- Convert Python objects to streams of bytes and back.
|
|
|
|
|
1998-01-21 01:04:52 -04:00
|
|
|
\item[copy_reg]
|
1998-02-18 11:39:15 -04:00
|
|
|
--- Register \module{pickle} support functions.
|
1998-01-21 01:04:52 -04:00
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\item[shelve]
|
|
|
|
--- Python object persistency.
|
|
|
|
|
|
|
|
\item[copy]
|
|
|
|
--- Shallow and deep copy operations.
|
|
|
|
|
|
|
|
\item[marshal]
|
|
|
|
--- Convert Python objects to streams of bytes and back (with
|
|
|
|
different constraints).
|
|
|
|
|
|
|
|
\item[imp]
|
1998-02-18 11:39:15 -04:00
|
|
|
--- Access the implementation of the \keyword{import} statement.
|
1995-03-28 09:35:14 -04:00
|
|
|
|
1996-07-20 23:22:12 -03:00
|
|
|
\item[parser]
|
|
|
|
--- Retrieve and submit parse trees from and to the runtime support
|
|
|
|
environment.
|
|
|
|
|
1998-02-11 18:36:17 -04:00
|
|
|
\item[symbol]
|
|
|
|
--- Constants representing internal nodes of the parse tree.
|
|
|
|
|
|
|
|
\item[token]
|
|
|
|
--- Constants representing terminal nodes of the parse tree.
|
|
|
|
|
1997-11-20 17:03:33 -04:00
|
|
|
\item[keyword]
|
|
|
|
--- Test whether a string is a keyword in the Python language.
|
|
|
|
|
|
|
|
\item[code]
|
|
|
|
--- Code object services.
|
|
|
|
|
|
|
|
\item[pprint]
|
|
|
|
--- Data pretty printer.
|
|
|
|
|
|
|
|
\item[dis]
|
|
|
|
--- Disassembler.
|
|
|
|
|
1997-04-03 18:43:02 -04:00
|
|
|
\item[site]
|
|
|
|
--- A standard way to reference site-specific modules.
|
|
|
|
|
1997-11-20 17:03:33 -04:00
|
|
|
\item[user]
|
|
|
|
--- A standard way to reference user-specific modules.
|
|
|
|
|
1995-03-28 09:35:14 -04:00
|
|
|
\item[__builtin__]
|
|
|
|
--- The set of built-in functions.
|
|
|
|
|
|
|
|
\item[__main__]
|
|
|
|
--- The environment where the top-level script is run.
|
|
|
|
|
|
|
|
\end{description}
|