Beginning Python
Introductions Etc
Resources
Interactive Python
Lexical matters
Lines
Comments
Names and tokens
Blocks and indentation
Doc strings
Program structure
Operators
Code evaluation
Statements and inspection ÂÂ preliminaries
BuiltÂin dataÂtypes
Numeric types
Tuples and lists
Strings
The new string.format method
Unicode strings
Dictionaries
Files
Other builtÂin types
The None value/type
Boolean values
Sets and frozensets
Functions and Classes ÂÂ A PreviewStatements
Assignment statement
import statement
print statement
if: elif: else: statement
for: statement
while: statement
continue and break statements
try: except: statement
raise statement
with: statement
Writing a context manager
Using the with: statement
Del
case statement
Functions, Modules, Packages, and Debugging
Functions
The def statement
Returning values
Parameters
Arguments
Local variables
Other things to know about functions
Global variables and the global statement
Doc strings for functions
Decorators for functions
Lambda
Iterators and generators
Modules
Doc strings for modules
Packages
Classes
A simple class
Defining methods
The constructor
Member variables
Calling methods
Adding inheritance
Class variables
Class methods and static methods
Properties
Interfaces
NewÂstyle classes
Doc strings for classes
Private members
Special Tasks
Debugging tools
File input and output
Unit tests
A simple example
Unit test suites
Additional unittest features
Guidance on Unit Testing
Doctest
The Python database API
Installing Python packages
More Python Features and Exercises
Advanced Python
Regular Expressions
regular expressions
Compiling regular expressions
Using regular expressions
Using match objects to extract a value
Extracting multiple items
Replacing multiple items
Iterator Objects
A generator function
A class containing a generator method
An iterator class
An iterator class that uses yield
A list comprehension
A generator expression
Unit Tests
Defining unit tests
Create a test class
Extending and embedding Python
Introduction and concepts
Extension modules
Pyrex
SWIG vs. Pyrex
Cython
Extension types
Extension classes
Parsing
Special purpose parsers
Writing a recursive descent parser by hand
Creating a lexer/tokenizer with Plex
A survey of existing tools
Creating a parser with PLY
Creating a parser with pyparsing
Parsing commaÂdelimited lines
Parsing functors
Parsing names, phone numbers, etc
A more complex example
GUI Applications
Introduction
PyGtk
A simple message dialog box
A simple text input dialog box
A file selection dialog box
EasyGUI
A simple EasyGUI example
An EasyGUI file open dialog example
Guidance on Packages and Modules
Introduction
Implementing Packages
Using Packages
Distributing and Installing Packages