Reading Guide to Automate the Boring Stuff, Second Edition, for Readers of the First Edition
Tue 31 December 2019 Al Sweigart
The second edition of Automate the Boring Stuff with Python is now available online under a Creative Commons license. This book teaches programming to complete beginners with no previous experience. The first edition was published in 2015. This blog post outlines the new content in the second edition with links to the content online so that readers of the first edition can immediately find the new content.
You can also buy a print book from the publisher, No Starch Press, and receive PDF/Kindle/epub ebooks for free with purchase (something you won't get from Amazon).
There are many small edit throughout the book, but here are the new sections:
Introduction
- You Are Not Too Old to Learn Programming - A short section to remind you that you're not too old to learn to program, just like you don't need to be good at math to program.
- Downloading and Installing Mu - You can use IDLE (which comes with Python) to type your code
Chapter 1 - Python Basics
- No new sections.
Chapter 2 - Flow Control
- A Short Program: Guess the Number - Not new, but refined and moved from Chapter 3.
- A Short Program: Rock, Paper, Scissors - An example rock, paper, scissors game.
Chapter 3 - Functions
- The Call Stack - Understanding the call stack helps you develop a mental model for function calls and scopes.
- A Short Program: Zigzag - A fun animation program.
Chapter 4 - Lists
- Identity and the id() Function - The
id()
function can help develop your mental model of objects and references in Python. - A Short Program: Conway's Game of Life - The classic simple cellular automata program.
- Coin Flip Streaks - A practice project to collect coin flip statistics.
Chapter 5 - Dictionaries and Structuring Data
- Chess Dictionary Validator - A practice project to write code to ensure a dictionary for a chess board is well-formed.
Chapter 6 - Manipulating Strings
- Project: Multi-Clipboard Automatic Messages - The "password locker" project has been changed to a similar "multi-clipboard" project, since I don't want to encourage readers to keep their passwords in plain text on their hard drives.
- A Short Program: Pig Latin - A fun program to turn English into Pig Latin.
- Zombie Dice Bots - A practice project to write bots to play a game called, "Zombie Dice"
Chapter 7 - Pattern Matching with Regular Expressions
- Date Detection - A practice project to use regex to make sure date strings are properly formatted.
Chapter 8 - Input Validation
- This entire chapter is new, and covers the PyInputPlus module.
Chapter 9 - Reading and Writing Files
- Files and File Paths - This entire chapter has been rewritten to use the new
pathlib
module andPath
objects for file paths. - Using the / Operator to Join Paths - The
/
operator can joinPath
objects.
Chapter 10 - Organizing Files
- No new sections.
Chapter 11 - Debugging
- Mu's Debugger - Since the second edition uses the Mu editor instead of IDLE, the debugging chapter covers Mu's debugger.
Chapter 12 - Web Scraping
- Project: Opening All Search Results - A project to search the Python Package Index and automatically open each search result link.
Chapter 13 - Working with Excel Spreadsheets
- No new sections.
Chapter 14 - Working with Google Sheets
- This entire chapter is new, and covers the EZSheets module.
Chapter 15 - Working with PDF and Word Documents
- No new sections.
Chapter 16 - Working with CSV Files and JSON Data
- No new sections.
Chapter 17 - Keeping Time, Scheduling Tasks, and Launching Programs
- No new sections.
Chapter 18 - Sending Email and Text Messages
- Sending and Receiving Email with the Gmail API - Using the EZGmail module to access Gmail accounts.
Chapter 19 - Manipulating Images
- No new sections.
Chapter 20 - Controlling the Keyboard and Mouse with GUI Automation
- Setting Up Accessibility Apps on macOS - Setting up PyAutoGUI to work on macOS.
- Planning Your Mouse Movements - Covers the MouseInfo features of PyAutoGUI to log mouse coordinates.
- Getting Window Information - Covers the PyGetWindow features of PyAutoGUI to obtain window information.
- Displaying Message Boxes - Covers the PyMsgBox features of PyAutoGUI to display alert boxes.
- Using the Clipboard to Read a Text Field - A practice project to read text from other applications using PyAutoGUI and Pyperclip.