|
5 | 5 | % Write a chapter entitled ``Some Useful Modules'' |
6 | 6 | % --regex, math+cmath |
7 | 7 | % Should really move the Python startup file info to an appendix |
8 | | -% |
9 | 8 |
|
10 | | -\title{Python Tutorial -- DRAFT of \today} |
| 9 | +\title{Python Tutorial} |
11 | 10 |
|
12 | 11 | \input{boilerplate} |
13 | 12 |
|
|
22 | 21 | \begin{abstract} |
23 | 22 |
|
24 | 23 | \noindent |
25 | | -Python is a simple, yet powerful programming language that bridges the |
26 | | -gap between C and shell programming, and is thus ideally suited for |
27 | | -``throw-away programming'' and rapid prototyping. Its syntax is put |
28 | | -together from constructs borrowed from a variety of other languages; |
29 | | -most prominent are influences from ABC, C, Modula-3 and Icon. |
| 24 | +Python is an easy to learn, powerful programming language. It has |
| 25 | +efficient high-level data structures and a simple but effective |
| 26 | +approach to object-oriented programming. Python's elegant syntax and |
| 27 | +dynamic typing, together with its interpreted nature, make it an ideal |
| 28 | +language for scripting and rapid application development in many areas |
| 29 | +on most platforms. |
| 30 | + |
| 31 | +The Python interpreter and the extensive standard library are freely |
| 32 | +available in source or binary form for all major platforms from the |
| 33 | +Python web site, \file{http://www.python.org}, and can be freely |
| 34 | +distributed. The same site also contains distributions of and |
| 35 | +pointers to many free third party Python modules, programs and tools, |
| 36 | +and additional documentation. |
30 | 37 |
|
31 | 38 | The Python interpreter is easily extended with new functions and data |
32 | | -types implemented in C. Python is also suitable as an extension |
33 | | -language for highly customizable C applications such as editors or |
34 | | -window managers. |
35 | | - |
36 | | -Python is available for many operating systems: |
37 | | -several flavors of \UNIX{}, the Apple Macintosh, MS-DOS, Windows |
38 | | -(3.1(1), '95 and NT flavors), OS/2, and others. |
| 39 | +types implemented in C or C++ (or other languages callable from C). |
| 40 | +Python is also suitable as an extension language for customizable |
| 41 | +applications. |
39 | 42 |
|
40 | 43 | This tutorial introduces the reader informally to the basic concepts |
41 | 44 | and features of the Python language and system. It helps to have a |
42 | | -Python interpreter handy for hands-on experience, but as the examples |
43 | | -are self-contained, the tutorial can be read off-line as well. |
44 | | - |
45 | | -For a description of standard objects and modules, see the \emph{Python |
46 | | -Library Reference} document. The \emph{Python Reference Manual} gives |
47 | | -a more formal definition of the language. |
| 45 | +Python interpreter handy for hands-on experience, but all examples are |
| 46 | +self-contained, so the tutorial can be read off-line as well. |
| 47 | + |
| 48 | +For a description of standard objects and modules, see the |
| 49 | +\emph{Python Library Reference} document. The \emph{Python Reference |
| 50 | +Manual} gives a more formal definition of the language. To write |
| 51 | +extensions in C or C++, read the \emph{Extending and Embedding} and |
| 52 | +\emph{Python/C API} manuals. There are also several books covering |
| 53 | +Python in depth. |
| 54 | + |
| 55 | +This tutorial does not attempt to be comprehensive and cover every |
| 56 | +single feature, or even every commonly used feature. Instead, it |
| 57 | +introduces many of Python's most noteworthy features, and will give |
| 58 | +you a good idea of the language's flavor and style. After reading it, |
| 59 | +you will be able to read and write Python modules and programs, and |
| 60 | +you will be ready to learn more about the various Python library |
| 61 | +modules described in the \emph{Python Library Reference}. |
48 | 62 |
|
49 | 63 | \end{abstract} |
50 | 64 |
|
|
61 | 75 |
|
62 | 76 | \chapter{Whetting Your Appetite} |
63 | 77 |
|
64 | | -\section{Disclaimer} |
65 | | - |
66 | | -Now that there are several books out on Python, this tutorial has lost |
67 | | -its role as the only introduction to Python for most new users. This |
68 | | -tutorial does not attempt to be comprehensive and cover every single |
69 | | -feature, or even every commonly used feature. Instead, it introduces |
70 | | -many of Python's most noteworthy features, and will give you a good |
71 | | -idea of the language's flavor and style. |
72 | | - |
73 | | -%It takes time to keep a document like this up to date in the face of |
74 | | -%additions to the language, and I simply don't have enough time to do a |
75 | | -%good job. Therefore, this version of the tutorial is almost unchanged |
76 | | -%since the previous release. This doesn't mean that the tutorial is |
77 | | -%out of date --- all the examples still work exactly as before. There |
78 | | -%are simply some new areas of the language that aren't covered. |
79 | | - |
80 | | -%To make up for this, there are some chapters at the end that cover |
81 | | -%important changes in recent Python releases, and these are up to date |
82 | | -%with the current release. |
83 | | - |
84 | 78 | \section{Introduction} |
85 | 79 |
|
86 | 80 | If you ever wrote a large shell script, you probably know this |
@@ -150,7 +144,7 @@ \section{Introduction} |
150 | 144 | By the way, the language is named after the BBC show ``Monty Python's |
151 | 145 | Flying Circus'' and has nothing to do with nasty reptiles. Making |
152 | 146 | references to Monty Python skits in documentation is not only allowed, |
153 | | -it is encouraged. |
| 147 | +it is encouraged! |
154 | 148 |
|
155 | 149 | \section{Where From Here} |
156 | 150 |
|
|
0 commit comments