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