Added 'list_only' option (and modified 'run()' to respect it).
[python/dscho.git] / Doc / lib / libintro.tex
bloba4bc67e2e374a305da9ecc0c7492fe84ed3e6361
1 \chapter{Introduction}
2 \label{intro}
4 The ``Python library'' contains several different kinds of components.
6 It contains data types that would normally be considered part of the
7 ``core'' of a language, such as numbers and lists. For these types,
8 the Python language core defines the form of literals and places some
9 constraints on their semantics, but does not fully define the
10 semantics. (On the other hand, the language core does define
11 syntactic properties like the spelling and priorities of operators.)
13 The library also contains built-in functions and exceptions ---
14 objects that can be used by all Python code without the need of an
15 \keyword{import} statement. Some of these are defined by the core
16 language, but many are not essential for the core semantics and are
17 only described here.
19 The bulk of the library, however, consists of a collection of modules.
20 There are many ways to dissect this collection. Some modules are
21 written in C and built in to the Python interpreter; others are
22 written in Python and imported in source form. Some modules provide
23 interfaces that are highly specific to Python, like printing a stack
24 trace; some provide interfaces that are specific to particular
25 operating systems, like socket I/O; others provide interfaces that are
26 specific to a particular application domain, like the World-Wide Web.
27 Some modules are avaiable in all versions and ports of Python; others
28 are only available when the underlying system supports or requires
29 them; yet others are available only when a particular configuration
30 option was chosen at the time when Python was compiled and installed.
32 This manual is organized ``from the inside out'': it first describes
33 the built-in data types, then the built-in functions and exceptions,
34 and finally the modules, grouped in chapters of related modules. The
35 ordering of the chapters as well as the ordering of the modules within
36 each chapter is roughly from most relevant to least important.
38 This means that if you start reading this manual from the start, and
39 skip to the next chapter when you get bored, you will get a reasonable
40 overview of the available modules and application areas that are
41 supported by the Python library. Of course, you don't \emph{have} to
42 read it like a novel --- you can also browse the table of contents (in
43 front of the manual), or look for a specific function, module or term
44 in the index (in the back). And finally, if you enjoy learning about
45 random subjects, you choose a random page number (see module
46 \refmodule{random}) and read a section or two. Regardless of the
47 order in which you read the sections of this manual, it helps to start
48 with chapter \ref{builtin}, ``Built-in Types, Exceptions and
49 Functions,'' as the remainder of the manual assumes familiarity with
50 this material.
52 Let the show begin!