Python in a Nutshell

Front Cover
"O'Reilly Media, Inc.", 2003 - 636 pages

Ask any Python aficionado and you'll hear that Python programmers have it all: an elegant language that offers object-oriented programming support, a readable, maintainable syntax, integration with C components, and an enormous collection of precoded standard library and extension modules. Moreover, Python is easy to learn but powerful enough to take on the most ambitious programming challenges. But what Python programmers have lacked is one concise and clear reference resource, with the appropriate measure of guidance in how best to use Python's great power. NowPython in a Nutshellfills this need.

In the tradition of O'Reilly's "In a Nutshell" series, this book offers Python programmers one place to look when they need help remembering or deciphering the syntax of this open source language and its many modules. This comprehensive reference guide makes it easy to look up all the most frequently needed information--not just about the Python language itself, but also the most frequently used parts of the standard library and the most important third-party extensions.

Python in a Nutshellfocuses on Python 2.2 (and all its point releases), currently the most stable and widespread Python release. This book includes:

  • A fast-paced tutorial on the syntax of the Python language itself
  • An explanation of object-oriented programming in Python, covering both the classic and new-style object models
  • Coverage of other core topics, including exceptions, modules, strings, and regular expressions
  • A quick reference for Python's built-in types and functions, as well as the key modules in the Python standard library, including sys, os, time, thread, math, and socket, among many others
  • Reference material on important third-party extensions, such as Numeric and Tkinter
  • Information about extending Python and embedding it into other applications
Python in a Nutshellprovides a solid, no-nonsense quick reference to information that programmers rely on the most. This latest addition to the best-selling "In a Nutshell" series will immediately earn its place in any Python programmer's library.
 

Contents

I
v
II
xi
III
1
IV
3
V
4
VI
5
VII
7
VIII
8
LXXXIV
269
LXXXV
273
LXXXVI
274
LXXXVII
276
LXXXVIII
277
LXXXIX
278
XC
279
XCI
284

IX
12
XII
16
XIII
17
XIV
19
XV
22
XVI
24
XVII
25
XVIII
29
XIX
33
XX
39
XXI
43
XXII
44
XXIII
46
XXIV
49
XXV
51
XXVII
58
XXVIII
69
XXX
70
XXXI
81
XXXII
90
XXXIII
100
XXXIV
104
XXXV
107
XXXVI
108
XXXVII
109
XXXVIII
111
XXXIX
112
XL
116
XLI
120
XLII
124
XLIV
126
XLV
129
XLVI
137
XLVII
141
XLIX
143
LI
145
LII
149
LIII
151
LIV
153
LV
154
LVII
156
LVIII
169
LX
171
LXIII
173
LXIV
187
LXV
192
LXVI
197
LXVII
198
LXVIII
204
LXIX
206
LXX
212
LXXI
215
LXXII
223
LXXIII
224
LXXIV
230
LXXV
234
LXXVI
237
LXXVII
245
LXXVIII
249
LXXIX
250
LXXX
252
LXXXI
260
LXXXII
262
LXXXIII
268
XCII
287
XCIII
288
XCIV
292
XCV
296
XCVI
297
XCVII
299
XCVIII
300
XCIX
301
C
303
CI
304
CII
322
CIII
326
CIV
328
CV
329
CVI
330
CVII
336
CVIII
341
CIX
344
CX
347
CXI
356
CXII
362
CXIII
365
CXIV
371
CXV
380
CXVI
388
CXVII
391
CXVIII
405
CXIX
407
CXX
416
CXXI
419
CXXII
423
CXXIII
427
CXXIV
428
CXXV
431
CXXVIII
438
CXXIX
443
CXXX
454
CXXXIII
462
CXXXIV
466
CXXXV
469
CXXXVII
472
CXXXVIII
481
CXXXIX
485
CXL
488
CXLI
490
CXLII
494
CXLIV
495
CXLV
496
CXLVI
501
CXLVII
508
CXLVIII
513
CXLIX
515
CL
545
CLI
546
CLII
550
CLIII
551
CLIV
554
CLV
557
CLVI
560
CLIX
568
CLX
569
CLXI
571
Copyright

Common terms and phrases

About the author (2003)

Alex Martelli spent 8 years with IBM Research, winning three Outstanding Technical Achievement Awards. He then spent 13 as a Senior Software Consultant at think3 inc, developing libraries, network protocols, GUI engines, event frameworks, and web access frontends. He has also taught programming languages, development methods, and numerical computing at Ferrara University and other venues. He's a C++ MVP for Brainbench, and a member of the Python Software Foundation. He currently works for AB Strakt, a Python-centered software house in Gteborg, Sweden, mostly by telecommuting from his home in Bologna, Italy. Alex's proudest achievement is the articles that appeared in Bridge World (January/February 2000), which were hailed as giant steps towards solving issues that had haunted contract bridge theoreticians for decades.

Bibliographic information