Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 1 | \chapter{Introduction} |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 2 | \label{intro} |
Guido van Rossum | 5fdeeea | 1994-01-02 01:22:07 +0000 | [diff] [blame] | 3 | |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 4 | The ``Python library'' contains several different kinds of components. |
| 5 | |
| 6 | It contains data types that would normally be considered part of the |
Guido van Rossum | 02ee80d | 1995-04-04 12:29:37 +0000 | [diff] [blame] | 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 |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 11 | syntactic properties like the spelling and priorities of operators.) |
| 12 | |
| 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 |
Fred Drake | 55fca54 | 1998-02-18 15:21:26 +0000 | [diff] [blame] | 15 | \keyword{import} statement. Some of these are defined by the core |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 16 | language, but many are not essential for the core semantics and are |
| 17 | only described here. |
| 18 | |
| 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. |
| 31 | |
| 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. |
| 37 | |
| 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 |
Guido van Rossum | 02ee80d | 1995-04-04 12:29:37 +0000 | [diff] [blame] | 43 | front of the manual), or look for a specific function, module or term |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 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 |
Fred Drake | d03e9e3 | 1999-04-29 13:41:17 +0000 | [diff] [blame^] | 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. |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 51 | |
| 52 | Let the show begin! |