1 – AN OVERVIEW OF PYTHON
- What Is Python?
- Python Timeline
- Advantages and Disadvantages of Python
- Calling Up Help with pydoc
2 – THE PYTHON ENVIRONMENT
- Starting Python
- Using the Interpreter
- Running a Python Script
- Python Scripts Under Unix/Windows
- Editors and IDEs
3 – GETTING STARTED
- Using Variables
- Built-in Functions
- Strings
- Numbers
- Converting Between Types
- Output to the Screen
- Command-Line Parameters
4 – FLOW CONTROL
- About Flow Control
- White Space
- Conditional Expressions
- Comparison and Boolean Operators
- While Loops
- Alternative Loop Exits
5 – SEQUENCES
- About Sequences
- Lists and List Methods
- Tuples
- Indexing and Slicing
- Iterating Through a Sequence
- Sequence Functions, Keywords and Operators
- List Comprehensions
- Generator Expressions
- Nested Sequences
6 – WORKING WITH FILES
- Overview of Files
- Opening a Text File
- Reading a Text File
- Writing to a Text File
- Reading and Writing Raw Data (Binary Data)
- Converting Binary Data with struct
7 – DICTIONARIES AND SETS
- About Dictionaries
- Creating Dictionaries
- Iterating Through a Dictionary
- About Sets
- Creating Sets
- Working with Sets
8 – FUNCTIONS
- Defining Functions
- Parameters
- Global and Local Scope
- Nested Functions
- Returning Values
9 – SORTING
- The sorted() Function
- Alternative Keys
- Lambda Functions
- Sorting Collections
- Using operator.itemgetter()
- Reverse Sorting
10 – ERRORS AND EXCEPTION HANDLING
- Syntax Errors
- Exceptions
- Using try/except/else/finally
- Handling Multiple Exceptions
- Ignoring Exceptions
11 – MODULES AND PACKAGES
- The import Statement
- Module Search Path
- Creating Modules
- Using Packages
- Function and Module Aliases
12 – CLASSES
- About Object-Oriented Programming
- Defining Classes
- Constructors
- Methods
- Instance Data
- Properties
- Class Methods and Data
13 – REGULAR EXPRESSIONS
- Overview of RE Syntax
- RE Objects
- Searching and Matching
- Compilation Flags
- Groups and Special Groups
- Replacing Text
- Splitting Strings
14 – THE STANDARD LIBRARY
- The sys Module
- Starting External Programs
- Mathematical Functions
- Random Numbers
- The string Module
- Reading CSV Data
15 – DATE AND TIME
- Working with Date and Time
- Converting Timestamps
- Parsing Dates from Text
- Formatting Dates
- Calendar Data
16 – WORKING WITH THE FILE SYSTEM
- Paths, Directories and Filenames
- Checking for Existence
- Permissions and Other File Attributes
- Walking Directory Trees
- Creating Filters with fileinput
- Using shutil for File Operations
17 – ADVANCED DATA PROCESSING
- Defaultdict and Counter
- Pretty-Printing Data Structures
- Compressed Archives (zip, gzip, tar, etc.)
- Persistent Data
18 – NETWORK SERVICES
- Retrieving Web Content
- Sending Email
- Using SSH for Remote Access
- Using FTP
19 – DEVELOPING PRACTICAL APPLICATIONS
- Parsing Command-Line Options
- Detecting the Current Platform
- Trapping Signals
- Implementing Logging