Books & Videos

Table of Contents

  1. Getting Started

    1. Chapter 1 A Python Q&A Session

      1. Why Do People Use Python?
      2. Is Python a Scripting Language?
      3. Okay, But What's the Downside?
      4. Who Uses Python Today?
      5. What Can I Do with Python?
      6. What Are Python's Technical Strengths?
      7. How Does Python Stack Up to Language X?
    2. Chapter 2 How Python Runs Programs

      1. Introducing the Python Interpreter
      2. Program Execution
      3. Execution Model Variations
    3. Chapter 3 How You Run Programs

      1. Interactive Coding
      2. System Command Lines and Files
      3. Clicking Windows File Icons
      4. Module Imports and Reloads
      5. The IDLE User Interface
      6. Other IDEs
      7. Embedding Calls
      8. Frozen Binary Executables
      9. Text Editor Launch Options
      10. Other Launch Options
      11. Future Possibilities?
      12. Which Option Should I Use?
      13. Part I Exercises
  2. Types and Operations

    1. Chapter 4 Numbers

      1. Python Program Structure
      2. Why Use Built-in Types?
      3. Numbers
      4. Python Expression Operators
      5. Numbers in Action
      6. The Dynamic Typing Interlude
    2. Chapter 5 Strings

      1. String Literals
      2. Strings in Action
      3. String Formatting
      4. String Methods
      5. General Type Categories
    3. Chapter 6 Lists and Dictionaries

      1. Lists
      2. Lists in Action
      3. Dictionaries
      4. Dictionaries in Action
    4. Chapter 7 Tuples, Files, and Everything Else

      1. Tuples
      2. Files
      3. Type Categories Revisited
      4. Object Generality
      5. References Versus Copies
      6. Comparisons, Equality, and Truth
      7. Python's Type Hierarchies
      8. Other Types in Python
      9. Built-in Type Gotchas
      10. Part II Exercises
  3. Statements and Syntax

    1. Chapter 8 Assignment, Expressions, and Print

      1. Assignment Statements
      2. Expression Statements
      3. Print Statements
    2. Chapter 9 if Tests

      1. if Statements
      2. Python Syntax Rules
      3. Truth Tests
    3. Chapter 10 while and for Loops

      1. while Loops
      2. break, continue, pass, and the Loop else
      3. for Loops
      4. Loop Variations
    4. Chapter 11 Documenting Python Code

      1. The Python Documentation Interlude
      2. Common Coding Gotchas
      3. Part III Exercises
  4. Functions

    1. Chapter 12 Function Basics

      1. Why Use Functions?
      2. Coding Functions
      3. A First Example: Definitions and Calls
      4. A Second Example: Intersecting Sequences
    2. Chapter 13 Scopes and Arguments

      1. Scope Rules
      2. The global Statement
      3. Scopes and Nested Functions
      4. Passing Arguments
      5. Special Argument Matching Modes
    3. Chapter 14 Advanced Function Topics

      1. Anonymous Functions: lambda
      2. Applying Functions to Arguments
      3. Mapping Functions Over Sequences
      4. Functional Programming Tools
      5. List Comprehensions
      6. Generators and Iterators
      7. Function Design Concepts
      8. Function Gotchas
      9. Part IV Exercises
  5. Modules

    1. Chapter 15 Modules: The Big Picture

      1. Why Use Modules?
      2. Python Program Architecture
      3. How Imports Work
    2. Chapter 16 Module Coding Basics

      1. Module Creation
      2. Module Usage
      3. Module Namespaces
      4. Reloading Modules
    3. Chapter 17 Module Packages

      1. Package Import Basics
      2. Package Import Example
      3. Why Use Package Imports?
      4. A Tale of Three Systems
    4. Chapter 18 Advanced Module Topics

      1. Data Hiding in Modules
      2. Enabling Future Language Features
      3. Mixed Usage Modes: __name__ and __main__
      4. Changing the Module Search Path
      5. The import as Extension
      6. Module Design Concepts
      7. Module Gotchas
      8. Part V Exercises
  6. Classes and OOP

    1. Chapter 19 OOP: The Big Picture

      1. Why Use Classes?
      2. OOP from 30,000 Feet
    2. Chapter 20 Class Coding Basics

      1. Classes Generate Multiple Instance Objects
      2. Classes Are Customized by Inheritance
      3. Classes Can Intercept Python Operators
    3. Chapter 21 Class Coding Details

      1. The Class Statement
      2. Methods
      3. Inheritance
      4. Operator Overloading
      5. Namespaces: The Whole Story
    4. Chapter 22 Designing with Classes

      1. Python and OOP
      2. Classes as Records
      3. OOP and Inheritance: "is-a" Relationships
      4. OOP and Composition: "has-a" Relationships
      5. OOP and Delegation
      6. Multiple Inheritance
      7. Classes Are Objects: Generic Object Factories
      8. Methods Are Objects: Bound or Unbound
      9. Documentation Strings Revisited
      10. Classes Versus Modules
    5. Chapter 23 Advanced Class Topics

      1. Extending Built-in Types
      2. Pseudo-Private Class Attributes
      3. "New Style" Classes in Python 2.2
      4. Class Gotchas
      5. Part VI Exercises
  7. Exceptions and Tools

    1. Chapter 24 Exception Basics

      1. Why Use Exceptions?
      2. Exception Handling: The Short Story
      3. The try/except/else Statement
      4. The try/finally Statement
      5. The raise Statement
      6. The assert Statement
    2. Chapter 25 Exception Objects

      1. String-Based Exceptions
      2. Class-Based Exceptions
      3. General raise Statement Forms
    3. Chapter 26 Designing with Exceptions

      1. Nesting Exception Handlers
      2. Exception Idioms
      3. Exception Design Tips
      4. Exception Gotchas
      5. Core Language Summary
      6. Part VII Exercises
  8. The Outer Layers

    1. Chapter 27 Common Tasks in Python

      1. Exploring on Your Own
      2. Conversions, Numbers, and Comparisons
      3. Manipulating Strings
      4. Data Structure Manipulations
      5. Manipulating Files and Directories
      6. Internet-Related Modules
      7. Executing Programs
      8. Debugging, Testing, Timing, Profiling
      9. Exercises
    2. Chapter 28 Frameworks

      1. An Automated Complaint System
      2. Interfacing with COM: Cheap Public Relations
      3. A Tkinter-Based GUI Editor for Managing Form Data
      4. Jython: The Felicitous Union of Python and Java
      5. Exercises
    3. Chapter 29 Python Resources

      1. Layers of Community
      2. The Process
      3. Services and Products
      4. The Legal Framework: The Python Software Foundation
      5. Software
      6. Popular Third-Party Software
      7. Web Application Frameworks
      8. Tools for Python Developers
  9. Appendixes

    1. Appendix A Installation and Configuration

      1. Installing the Python Interpreter
    2. Appendix B Solutions to Exercises

      1. Part I, Getting Started
      2. Part II, Types and Operations
      3. Part III, Statements and Syntax
      4. Part IV, Functions
      5. Part V, Modules
      6. Part VI, Classes and OOP
      7. Part VII, Exceptions and Tools
      8. Part VIII, The Outer Layers
  1. Colophon