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 |
Fred Drake | 38e5d27 | 2000-04-03 20:13:55 +0000 | [diff] [blame] | 25 | operating systems, such as access to specific hardware; others provide |
| 26 | interfaces that are |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 27 | specific to a particular application domain, like the World-Wide Web. |
Thomas Wouters | f831663 | 2000-07-16 19:01:10 +0000 | [diff] [blame] | 28 | Some modules are available in all versions and ports of Python; others |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 29 | are only available when the underlying system supports or requires |
| 30 | them; yet others are available only when a particular configuration |
| 31 | option was chosen at the time when Python was compiled and installed. |
| 32 | |
Fred Drake | 38e5d27 | 2000-04-03 20:13:55 +0000 | [diff] [blame] | 33 | This manual is organized ``from the inside out:'' it first describes |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 34 | the built-in data types, then the built-in functions and exceptions, |
| 35 | and finally the modules, grouped in chapters of related modules. The |
| 36 | ordering of the chapters as well as the ordering of the modules within |
| 37 | each chapter is roughly from most relevant to least important. |
| 38 | |
| 39 | This means that if you start reading this manual from the start, and |
| 40 | skip to the next chapter when you get bored, you will get a reasonable |
| 41 | overview of the available modules and application areas that are |
| 42 | supported by the Python library. Of course, you don't \emph{have} to |
| 43 | 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] | 44 | 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] | 45 | in the index (in the back). And finally, if you enjoy learning about |
| 46 | random subjects, you choose a random page number (see module |
Fred Drake | d03e9e3 | 1999-04-29 13:41:17 +0000 | [diff] [blame] | 47 | \refmodule{random}) and read a section or two. Regardless of the |
| 48 | order in which you read the sections of this manual, it helps to start |
| 49 | with chapter \ref{builtin}, ``Built-in Types, Exceptions and |
| 50 | Functions,'' as the remainder of the manual assumes familiarity with |
| 51 | this material. |
Guido van Rossum | 233aa1d | 1995-03-30 16:01:15 +0000 | [diff] [blame] | 52 | |
| 53 | Let the show begin! |