blob: 62434cd6bbc88dbbb06e88e0a2ab2f988ae05fcb [file] [log] [blame]
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00001\chapter{Introduction}
Fred Drake55fca541998-02-18 15:21:26 +00002\label{intro}
Guido van Rossum5fdeeea1994-01-02 01:22:07 +00003
Guido van Rossum233aa1d1995-03-30 16:01:15 +00004The ``Python library'' contains several different kinds of components.
5
6It contains data types that would normally be considered part of the
Guido van Rossum02ee80d1995-04-04 12:29:37 +00007``core'' of a language, such as numbers and lists. For these types,
8the Python language core defines the form of literals and places some
9constraints on their semantics, but does not fully define the
10semantics. (On the other hand, the language core does define
Guido van Rossum233aa1d1995-03-30 16:01:15 +000011syntactic properties like the spelling and priorities of operators.)
12
13The library also contains built-in functions and exceptions ---
14objects that can be used by all Python code without the need of an
Fred Drake55fca541998-02-18 15:21:26 +000015\keyword{import} statement. Some of these are defined by the core
Guido van Rossum233aa1d1995-03-30 16:01:15 +000016language, but many are not essential for the core semantics and are
17only described here.
18
19The bulk of the library, however, consists of a collection of modules.
20There are many ways to dissect this collection. Some modules are
21written in C and built in to the Python interpreter; others are
22written in Python and imported in source form. Some modules provide
23interfaces that are highly specific to Python, like printing a stack
24trace; some provide interfaces that are specific to particular
Fred Drake38e5d272000-04-03 20:13:55 +000025operating systems, such as access to specific hardware; others provide
26interfaces that are
Fred Drake8ee679f2001-07-14 02:50:55 +000027specific to a particular application domain, like the World Wide Web.
Thomas Woutersf8316632000-07-16 19:01:10 +000028Some modules are available in all versions and ports of Python; others
Guido van Rossum233aa1d1995-03-30 16:01:15 +000029are only available when the underlying system supports or requires
30them; yet others are available only when a particular configuration
31option was chosen at the time when Python was compiled and installed.
32
Fred Drake38e5d272000-04-03 20:13:55 +000033This manual is organized ``from the inside out:'' it first describes
Guido van Rossum233aa1d1995-03-30 16:01:15 +000034the built-in data types, then the built-in functions and exceptions,
35and finally the modules, grouped in chapters of related modules. The
36ordering of the chapters as well as the ordering of the modules within
37each chapter is roughly from most relevant to least important.
38
39This means that if you start reading this manual from the start, and
40skip to the next chapter when you get bored, you will get a reasonable
41overview of the available modules and application areas that are
42supported by the Python library. Of course, you don't \emph{have} to
43read it like a novel --- you can also browse the table of contents (in
Guido van Rossum02ee80d1995-04-04 12:29:37 +000044front of the manual), or look for a specific function, module or term
Guido van Rossum233aa1d1995-03-30 16:01:15 +000045in the index (in the back). And finally, if you enjoy learning about
46random subjects, you choose a random page number (see module
Fred Draked03e9e31999-04-29 13:41:17 +000047\refmodule{random}) and read a section or two. Regardless of the
48order in which you read the sections of this manual, it helps to start
49with chapter \ref{builtin}, ``Built-in Types, Exceptions and
50Functions,'' as the remainder of the manual assumes familiarity with
51this material.
Guido van Rossum233aa1d1995-03-30 16:01:15 +000052
53Let the show begin!