Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Al Sweigart

Rating No ratings yet

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 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. Once you’ve mastered the basics of programming, you’ll create Python programs that effortlessly perform useful and impressive feats of automation to –Search for text in a file or across multiple files –Create, update, move, and rename files and folders –Search the Web and download online content –Update and format data in Excel spreadsheets of any size –Split, merge, watermark, and encrypt PDFs –Send reminder emails and text notifications –Fill out online forms Step-by-step instructions walk you through each program, and practice projects at the end of each chapter challenge you to improve those programs and use your newfound skills to automate similar tasks. Don’t spend your time doing work a well-trained monkey could do. Even if you’ve never written a line of code, you can make your computer do the grunt work. Learn how inAutomate the Boring Stuff with Python .

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A beginner-friendly, project-driven guide that teaches just enough Python to make your computer handle repetitive file, spreadsheet, document, web, and notification chores for you. Best for non-programmers, office workers, students, and anyone drowning in manual digital busywork. 【Book Arc】 - **Opening (~0%–15%)**: Sets expectations and dismantles programming myths—no heavy math required, AI won't replace programmers—then introduces Python and the interactive shell as a low-stakes place to experiment. - **Early (~15%–35%)**: Builds core fundamentals in reading order: flow control, loops, functions and scope, debugging tools, lists, dictionaries, and strings. This stage solves the "I can't write code at all" problem. - **Middle (~35%–60%)**: Moves into Part II automation: regular expressions, file reading/writing, organizing files with shutil and zipfile, command-line program design, and spreadsheet work in Excel and Google Sheets. - **Late (~60%–85%)**: Extends automation to databases, Word documents, PDFs, CSV/JSON/XML, scheduling and launching programs, email/text/push notifications, and image or graph manipulation. - **Ending (~85%–100%)**: Wraps with speech synthesis and recognition, video downloading, plus appendices on installing third-party packages and answers to practice questions. 【Key Takeaways】 - **Automation is framed as small, achievable triumphs** (Opening): the book's core promise is turning tedious multi-hour manual work into short scripts, using a retail price-comparison anecdote to show the payoff. - **Fundamentals are taught just-in-time, not exhaustively** (Early): flow control, functions, lists, and dictionaries appear because later automation projects need them, keeping motivation high. - **Deliberately simple coding style** (Late): the author admits using global variables and skipping object-oriented programming, list comprehensions, and generators to reduce beginner complexity. - **Practice projects anchor every chapter** (Middle): projects like random quiz-file generation, ZIP backups, spreadsheet updates, and a fake blockchain scam exercise turn concepts into working tools. - **The automation surface area is broad** (Middle–Late): files and folders, Excel and Google Sheets, SQLite, Word, PDFs, CSV/JSON/XML, email, SMS, push notifications, images, and speech. - **Command-line and deployment skills matter** (Middle): the book covers terminal basics, PATH, virtual environments, pip, clipboard I/O, and packaging programs for Windows, macOS, and Linux. - **Scheduling and external programs extend reach** (Late): time and datetime modules, Task Scheduler/launchd/cron, and launching other programs let scripts run unattended. - **Beginner mindset is explicitly addressed** (Late): the introduction argues programming is learnable through practice and that current skill gaps don't predict future ability. 【Reading Tips】 - **Deep-read Part I if you're new**; if you already know Python basics, skim chapters 1–8 and start seriously at chapter 9. - **Do the practice projects**—they are where the automation skills actually stick, and appendix B provides answers for self-checking. - **Expect the hardest spots around regular expressions, file paths, and API setup** (Google Sheets, Gmail); slow down there and run the sample code. - **Keep the appendices handy** for installing third-party packages and managing virtual environments, since many later chapters depend on them. - **Treat the book as a project cookbook**: pick the automation closest to your own pain point and adapt it rather than reading linearly to the end. 【Coverage Limits】 The excerpts are heavily weighted toward the table of contents, introduction, and front matter; detailed chapter content, code examples, and project internals are only partially visible, so this guide describes structure and themes rather than specific implementation details.
Excerpt 1
tions Used in This Book What Is Programming? What Is Python? Common Myths About Programming Programmers Don’t Need to Know Much Math You Are Not Too Old to L...
View in text
Excerpt 2
) Importing Modules Ending a Program Early with sys.
View in text
Excerpt 3
ory Accessing the Home Directory Specifying Absolute vs.
View in text
Excerpt 4
uments Reading Word Documents Getting the Full Text from a .
View in text
Excerpt 5
ading Word Documents Getting the Full Text from a .docx File Styling Paragraph and Run Objects Applying Run Attributes Writing Word Documents Adding Headings...
View in text
Excerpt 6
itten in the Python language) and performs its instructions. You can download Windows, macOS, and Linux versions of the Python interpreter for free at https:...
View in text
Excerpt 7
ur screen, enter Mu Editor in the search box, and select it. On macOS, open the Finder window, click Applications , and then click mu-editor . You can also r...
View in text
Excerpt 8
ession to True if either of the two Boolean values is True . If both are False , it evaluates to False : >>> False or True True >>> False or False False You...
View in text
Tags
AI categories
PythonProgrammingTechnology
ISBN: 1718503407
Publisher: No Starch Press
Publish Year: 2025
Language: English
Pages: 793
File Format: EPUB
File Size: 22.4 MB