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