Table of Contents
Plongez au coeur de Python.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
Table of Contents Plongez au coeur de Python. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapitre 1. Installation de Python. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. 1. Quel Python vous faut−il ?. . . . . . . . . . . . . . . . . . . . . . .
Less
From Poussah
Adobe PDF document
Pub. on Nov. 4th 2009
Pages: 339
Views: 71
Downloads: 0
Table of Contents
Dive Into Python.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
Table of Contents Dive Into Python. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. Installing Python. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. 1. Which Python is right for you?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1. 2. Python on Windows. . . . . . . . . . . . . . . . . . .
Less
From Poussah
2/5
Adobe PDF document
Pub. on Nov. 4th 2009
Pages: 327
Views: 69
Downloads: 0
Porting Extension Modules to 3.
0
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 Conditional compilation i
2 Changes to Object APIs ii
2.
1 str/unicode Unification .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
Porting Extension Modules to 3. 0 Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 Conditional compilation i 2 Changes to Object APIs ii 2. 1 str/unicode Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 2. 2 long/int Unification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 3 Module initialization and state iii 4 Other options iv Indexv author Benjamin Peterson Abstract Although changing the C-API was not one of Python 3. 0’s objectives, the many Python level changes made leaving 2. x’s API intact impossible. In fact, some changes such as int() and long() unification are more obvious on the C level. This document endeavors to document incompatibilities and how they can be worked around. 1 Conditional compilation The easiest way to comp
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 5
Views: 77
Downloads: 17
Using Python
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 49
Views: 58
Downloads: 39
HOWTO Fetch Internet Resources
Using The urllib Package
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 Introduction ii
2 Fetching URLs ii
2.
1 Data .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
HOWTO Fetch Internet Resources Using The urllib Package Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 Introduction ii 2 Fetching URLs ii 2. 1 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 2. 2 Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 3 Handling Exceptions iv 3. 1 URLError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 3. 2 HTTPError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 11
Views: 512
Downloads: 86
Curses Programming with Python
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 What is curses? i
1.
1 The Python curses module .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
2...
More
Curses Programming with Python Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 What is curses? i 1. 1 The Python curses module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 2 Starting and ending a curses application ii 3 Windows and Pads iii 4 Displaying Text iv 4. 1 Attributes and Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v 5 User Input vi 6 For More Information vi Author A. M. Kuchling, Eric S. Raymond Release 2. 03 Abstract This document describes how to write text-mode programs with Python 2. x, using the curses extension module to control the display. 1 What is curses? The curses library supplies a terminal-independent screen-painting and keyboard-handling facility for text-based terminals; such terminals include VT100s, the Linux consol
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 7
Views: 273
Downloads: 39
What’s New in Python
Release 3.
1
A.
M.
Kuchling
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 PEP 372: Ordered Dictionaries i
2 PEP 378: Format Specifier for Thousands Separator ii
3 Other Language Changes ii
4 New, Improved, and Deprecated Modules iv
5 Optimizations vi
6 IDLE vii
7 Build and C API...
More
What’s New in Python Release 3. 1 A. M. Kuchling June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 PEP 372: Ordered Dictionaries i 2 PEP 378: Format Specifier for Thousands Separator ii 3 Other Language Changes ii 4 New, Improved, and Deprecated Modules iv 5 Optimizations vi 6 IDLE vii 7 Build and C API Changes vii 8 Porting to Python 3. 1 viii Indexix Author Raymond Hettinger Release 3. 1 Date June 26, 2009 This article explains the new features in Python 3. 1, compared to 3. 0. 1 PEP 372: Ordered Dictionaries Regular Python dictionaries iterate over key/value pairs in arbitrary order. Over the years, a number of authors have written alternative implementations that remember the order that the keys were originally inserted. Based on the experiences from those implementations, a new collections. OrderedDict class has been introduced. The OrderedDict API is substantially the same as regular dictionaries but will iterate over keys and values in a guaranteed
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 9
Views: 29
Downloads: 28
The Python/C API
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 160
Views: 34
Downloads: 28
HOWTO Use Python in the web
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 The low-level view ii
1.
1 Common Gateway Interface .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ii
Simple...
More
HOWTO Use Python in the web Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 The low-level view ii 1. 1 Common Gateway Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Simple script for testing CGI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Setting up CGI on your own server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Common problems with CGI scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1. 2 mod_python . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 1. 3 FastCGI and SCGI . . . . . . . . . . . . . . . . . . . . . . . .
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 11
Views: 49
Downloads: 38
Idioms and Anti-Idioms in Python
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 Language Constructs You Should Not Use i
1.
1 from module import * .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
Idioms and Anti-Idioms in Python Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 Language Constructs You Should Not Use i 1. 1 from module import * . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii Inside Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii At Module Level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii When It Is Just Fine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 1. 2 from module import name1, name2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 1. 3 except: . . . . . . . . . . . . . .
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 5
Views: 36
Downloads: 24
Distributing Python Modules
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 95
Views: 9
Downloads: 21
Installing Python Modules
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 48
Views: 186
Downloads: 24
Functional Programming HOWTO
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 Introduction ii
1.
1 Formal provability .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
iii
1....
More
Functional Programming HOWTO Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 Introduction ii 1. 1 Formal provability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1. 2 Modularity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1. 3 Ease of debugging and testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 1. 4 Composability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 2 Iterators iv 2. 1 Data Types That Support Iterators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v 3 Generator expressions and list comprehension
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 21
Views: 162
Downloads: 33
Documenting Python
Release 3.
1
Georg Brandl
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 54
Views: 9
Downloads: 18
The Python Library Reference
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 1 127
Views: 166
Downloads: 48
Regular Expression HOWTO
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
Contents
1 Introduction ii
2 Simple Patterns ii
2.
1 Matching Characters .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
....
More
Regular Expression HOWTO Release 3. 1 Guido van Rossum Fred L. Drake, Jr. , editor June 26, 2009 Python Software Foundation Email: docs@python. org Contents 1 Introduction ii 2 Simple Patterns ii 2. 1 Matching Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 2. 2 Repeating Things . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 3 Using Regular Expressions iv 3. 1 Compiling Regular Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 3. 2 The Backslash Plague . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v 3. 3 Performing Matches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v 3. 4 Module-Level Fu
Less
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 18
Views: 57
Downloads: 23
Extending and Embedding Python
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 98
Views: 54
Downloads: 29
The Python Language Reference
Release 3.
1
Guido van Rossum
Fred L.
Drake, Jr.
, editor
June 26, 2009
Python Software Foundation
Email: docs@python.
org
From Poussah
Adobe PDF document
Pub. on June 30th 2009
Pages: 110
Views: 27
Downloads: 40