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