Al Sweigart is a software developer, fellow of the Python Software Foundation, and author of several popular programming books including
The Big Book of Small Python Projects,
Beyond the Basic Stuff with Python,
Coding with Minecraft, and
The Recursive Book of Recursion (all from No Starch Press).
The bestselling introduction to Python programming, revised to include the latest Python features, improved explanations, and new chapters about databases and sound files.If you’ve ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do this work for you?
In this fully revised third edition of
Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required. Early chapters will teach you the fundamentals of Python through clear explanations and engaging examples. You’ll write your first Python program; work with strings, lists, dictionaries, and other data structures; then use regular expressions to find and manipulate text patterns.
Once you’ve mastered the basics, you’ll tackle projects that teach you to use Python to automate tasks like:
- Searching the web, downloading content, and filling out forms
- Finding, extracting, and manipulating text and data in files and spreadsheets
- Copying, moving, renaming, or compressing saved files on your computerSplitting, merging, and extracting text from PDFs and Word documents
- Interacting with applications through custom mouse and keyboard macros
- Managing your inbox, unsubscribing from lists, and sending email or text notifications
New to this edition: All code and examples have been thoroughly updated. You’ll also find four new chapters on database integration, speech recognition, and audio and video editing, as well as 16 new programming projects and expanded coverage of developer techniques like creating command line programs.
Don’t spend your time on work a well-trained monkey could do. Even if you’ve never written a line of code, you can pass off that grunt work to your computer. Learn how in
Automate the Boring Stuff with Python.
Foreword
Acknowledgments
Introduction
Part I: Programming Fundamentals
Chapter 1: Python Basics
Chapter 2: if-else and Flow Control
Chapter 3: Loops
Chapter 4: Functions
Chapter 5: Debugging
Chapter 6: Lists
Chapter 7: Dictionaries and Structuring Data
Chapter 8: Strings and Text Editing
Part II: Automating Tasks
Chapter 9: Text Pattern Matching with Regular Expressions
Chapter 10: Reading and Writing Files
Chapter 11: Organizing Files
Chapter 12: Designing and Deploying Command Line Programs
Chapter 13: Web Scraping
Chapter 14: Excel Spreadsheets
Chapter 15: Google Sheets
Chapter 16: SQLite Databases
Chapter 17: PDF and Word Documents
Chapter 18: CSV, JSON, and XML Files
Chapter 19: Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 20: Sending Email, Texts, and Push Notifications
Chapter 21: Making Graphs and Manipulating Images
Chapter 22: Recognizing Text in Images
Chapter 23: Controlling the Keyboard and Mouse
Chapter 24: Text-to-Speech and Speech Recognition Engines
Appendix A: Installing Third-Party Packages
Appendix B: Answers to the Practice Questions
Index
Praise for the second edition of
Automate the Boring Stuff with Python:
"With lessons on how to use Python to program Excel spreadsheets, crawl websites, parse PDFs and Word documents, send emails, and other productivity-boosting task automation, it's a stellar resource for office workers, academics, and administrators."
—Mashable
"I think many educational resources jump levels way too quickly. One of the best I ever used was Automate the Boring Stuff with Python - that book stayed at the right level the whole way!"
—Oscar Baruffa, @OscarBaruffa
Über den Autor
Al Sweigart is a professional software developer who teaches programming to kids and adults. Sweigart has written several bestselling programming books for beginners, including Invent Your Own Computer Games with Python, Cracking Codes with Python, and Coding with Minecraft, as well as for intermediate-level programmers, like Beyond the Basic Stuff with Python and The Recursive Book of Recursion (all from No Starch Press).
Inhaltsverzeichnis
Introduction
Part 1: Python Programming Basics
Chapter 1: Python Basics
Chapter 2: If-Else and Flow Control
Chapter 3: Loops
Chapter 4: Functions
Chapter 5: Debugging
Chapter 6: Lists
Chapter 7: Dictionaries and Data Structures
Chapter 8: Strings and Editing Text
Part 2: Automating Tasks
Chapter 9: Text Pattern Matching with Regular Expressions
Chapter 10: Reading and Writing Files
Chapter 11: Organizing Files
Chapter 12: Deploying Command Line Apps
Chapter 13: Web Scraping
Chapter 14: Working with Excel Spreadsheets
Chapter 15: Working with Google Sheets
Chapter 16: Working with Sqlite Databases
Chapter 17: Working with PDF And Word Documents
Chapter 18: Working with CSV, JSON, XML, YAML, And TOML Files
Chapter 19: Keeping Time, Scheduling Tasks, and Launching Programs
Chapter 20: Sending Email and Text Messages
Chapter 21: Generating Image Files
Chapter 22: Text Recognition and OCR
Chapter 23: Controlling the Keyboard and Mouse with GUI Automation
Chapter 24: Working with Video, Audio, And Webcams
Chapter 25: Text to Speech and Speech Recognition
A: Installing Third-party Packages with Pip
Klappentext
The bestselling introduction to practical Python programming for total beginners is now in its 3rd edition, revised to include the latest Python features, even better explanations, and new chapters about databases and sound files.
If you’ve ever spent hours renaming files or updating hundreds of spreadsheet cells, you know how tedious tasks like these can be. But what if you could have your computer do them for you? In this fully revised edition of the best-selling classic Automate the Boring Stuff with Python, you’ll learn how to use Python to write programs that do in minutes what would take you hours to do by hand—no prior programming experience required. You'll learn the basics of coding in Python and explore the language’s’s rich library of modules for performing specific tasks, like scraping data from websites, searching for text across multiple files, and merging, watermarking, or encrypting PDFs.
The third edition includes:
- Expanded coverage of developer techniques, like creating command line programs
- Updated examples and new projects
- Additional chapters about working with SQLite databases, speech-recognition technology, video and audio editing, and text-to-speech capabilities
- Simplified explanations (based on reader feedback) of beginner programming concepts, like loops and conditionals
Even if you've never written a line of code,
Automate the Boring Stuff with Python, 3rd Edition will teach you how to make your computer take on tedious tasks and do all your grunt work—the way it should be!