Next:
1 Whetting Your Appetite
Up:
Python Tutorial
Previous:
Python Tutorial
Contents
1 Whetting Your Appetite
1.1 Introduction
1.2 Where From Here
2 Using the Python Interpreter
2.1 Invoking the Interpreter
Argument Passing
Interactive Mode
2.2 The Interpreter and its Environment
Error Handling
Executable Python scripts
The Interactive Startup File
3 An Informal Introduction to Python
3.1 Using Python as a Calculator
Numbers
Strings
Lists
3.2 First Steps Towards Programming
4 More Control Flow Tools
4.1 If Statements
4.2 For Statements
4.3 The
range()
Function
4.4 Break and Continue Statements, and Else Clauses on Loops
4.5 Pass Statements
4.6 Defining Functions
4.7 More on Defining Functions
Default Argument Values
Keyword Arguments
Arbitrary Argument Lists
5 Data Structures
5.1 More on Lists
Functional Programming Tools
5.2 The
del
statement
5.3 Tuples and Sequences
5.4 Dictionaries
5.5 More on Conditions
5.6 Comparing Sequences and Other Types
6 Modules
6.1 More on Modules
The Module Search Path
``Compiled'' Python files
6.2 Standard Modules
6.3 The
dir()
function
7 Input and Output
7.1 Fancier Output Formatting
7.2 Reading and Writing Files
Methods of file objects
The pickle module
8 Errors and Exceptions
8.1 Syntax Errors
8.2 Exceptions
8.3 Handling Exceptions
8.4 Raising Exceptions
8.5 User-defined Exceptions
8.6 Defining Clean-up Actions
9 Classes
9.1 A word about terminology
9.2 Python scopes and name spaces
9.3 A first look at classes
Class definition syntax
Class objects
Instance objects
Method objects
9.4 Random remarks
9.5 Inheritance
Multiple inheritance
9.6 Private variables through name mangling
9.7 Odds and ends
Exceptions Can Be Classes
10 What Now?
11 Recent Additions as of Release 1.1
11.1 Lambda Forms
11.2 Documentation Strings
A Interactive Input Editing and History Substitution
A.1 Line Editing
A.2 History Substitution
A.3 Key Bindings
A.4 Commentary
About this document ...
guido@python.org