Navigation
index
next
|
previous
|
The Hazel Tree
»
Source
Python Documentation
ΒΆ
contents
[expand]
The Python tutorial
Whetting Your Appetite
Using the Python Interpreter
Invoking the Interpreter
Argument Passing
Interactive Mode
The Interpreter and Its Environment
Error Handling
Executable Python Scripts
Source Code Encoding
The Interactive Startup File
An Informal Introduction to Python
Using Python as a Calculator
Numbers
Strings
Unicode Strings
Lists
First Steps Towards Programming
More Control Flow Tools
if
Statements
for
Statements
The
range
Function
break
and
continue
Statements, and
else
Clauses on Loops
pass
Statements
Defining Functions
More on Defining Functions
Default Argument Values
Keyword Arguments
Arbitrary Argument Lists
Unpacking Argument Lists
Lambda Forms
Documentation Strings
Intermezzo: Coding Style
Data Structures
More on Lists
Using Lists as Stacks
Using Lists as Queues
Functional Programming Tools
List Comprehensions
Nested List Comprehensions
The
del
statement
Tuples and Sequences
Sets
Dictionaries
Looping Techniques
More on Conditions
Comparing Sequences and Other Types
Modules
More on Modules
Executing modules as scripts
The Module Search Path
“Compiled” Python files
Standard Modules
The
dir
Function
Packages
Importing * From a Package
Intra-package References
Packages in Multiple Directories
Input and Output
Fancier Output Formatting
Old string formatting
Reading and Writing Files
Methods of File Objects
The
pickle
Module
Errors and Exceptions
Syntax Errors
Exceptions
Handling Exceptions
Raising Exceptions
User-defined Exceptions
Defining Clean-up Actions
Predefined Clean-up Actions
Classes
A Word About Terminology
Python Scopes and Name Spaces
A First Look at Classes
Class Definition Syntax
Class Objects
Instance Objects
Method Objects
Random Remarks
Inheritance
Multiple Inheritance
Private Variables
Odds and Ends
Exceptions Are Classes Too
Iterators
Generators
Generator Expressions
Brief Tour of the Standard Library
Operating System Interface
File Wildcards
Command Line Arguments
Error Output Redirection and Program Termination
String Pattern Matching
Mathematics
Internet Access
Dates and Times
Data Compression
Performance Measurement
Quality Control
Batteries Included
Brief Tour of the Standard Library – Part II
Output Formatting
Templating
Working with Binary Data Record Layouts
Multi-threading
Logging
Weak References
Tools for Working with Lists
Decimal Floating Point Arithmetic
What Now?
Interactive Input Editing and History Substitution
Line Editing
History Substitution
Key Bindings
Commentary
Floating Point Arithmetic: Issues and Limitations
Representation Error
Python HOWTOs
Python Advocacy HOWTO
Reasons to Use Python
Programmability
Prototyping
Simplicity and Ease of Understanding
Java Integration
Arguments and Rebuttals
Useful Resources
Curses Programming with Python
What is curses?
The Python curses module
Starting and ending a curses application
Windows and Pads
Displaying Text
Attributes and Color
User Input
For More Information
Idioms and Anti-Idioms in Python
Language Constructs You Should Not Use
from module import *
Inside Function Definitions
At Module Level
When It Is Just Fine
Unadorned
exec
,
execfile
and friends
from module import name1, name2
except:
Exceptions
Using the Batteries
Using Backslash to Continue Statements
Functional Programming HOWTO
Introduction
Formal provability
Modularity
Ease of debugging and testing
Composability
Iterators
Data Types That Support Iterators
Generator expressions and list comprehensions
Generators
Passing values into a generator
Built-in functions
Small functions and the lambda expression
The itertools module
Creating new iterators
Calling functions on elements
Selecting elements
Grouping elements
The functools module
The operator module
The functional module
Revision History and Acknowledgements
References
General
Python-specific
Python documentation
Regular Expression HOWTO
Introduction
Simple Patterns
Matching Characters
Repeating Things
Using Regular Expressions
Compiling Regular Expressions
The Backslash Plague
Performing Matches
Module-Level Functions
Compilation Flags
More Pattern Power
More Metacharacters
Grouping
Non-capturing and Named Groups
Lookahead Assertions
Modifying Strings
Splitting Strings
Search and Replace
Common Problems
Use String Methods
match() versus search()
Greedy versus Non-Greedy
Not Using re.VERBOSE
Feedback
Socket Programming HOWTO
Sockets
History
Creating a Socket
IPC
Using a Socket
Binary Data
Disconnecting
When Sockets Die
Non-blocking Sockets
Performance
Unicode HOWTO
Introduction to Unicode
History of Character Codes
Definitions
Encodings
References
Python’s Unicode Support
The Unicode Type
Unicode Literals in Python Source Code
Unicode Properties
References
Reading and Writing Unicode Data
Unicode filenames
Tips for Writing Unicode-aware Programs
References
Revision History and Acknowledgements
HOWTO Fetch Internet Resources Using urllib2
Introduction
Fetching URLs
Data
Headers
Handling Exceptions
URLError
HTTPError
Error Codes
Wrapping it Up
Number 1
Number 2
info and geturl
Openers and Handlers
Basic Authentication
Proxies
Sockets and Layers
Footnotes
Navigation
index
next
|
previous
|
The Hazel Tree
»