Automate the Boring Stuff with Python - Info and Reading Options
Practical Programming for Total Beginners
By Al Sweigart

"Automate the Boring Stuff with Python" was published by No Starch Press in 2015 - San Francisco, USA, it has 504 pages and the language of the book is English.
“Automate the Boring Stuff with Python” Metadata:
- Title: ➤ Automate the Boring Stuff with Python
- Author: Al Sweigart
- Language: English
- Number of Pages: 504
- Publisher: No Starch Press
- Publish Date: 2015
- Publish Location: San Francisco, USA
“Automate the Boring Stuff with Python” Subjects and Themes:
- Subjects: ➤ Python (Computer program language) - Computer programming - Programming Languages - COMPUTERS - General - Python (computer program language) - Mathematics - Python
Edition Specifications:
- Format: Paperback, eBook
- Dimensions: 9.1 x 7.0 x 1.2 inches
Edition Identifiers:
- The Open Library ID: OL25763874M - OL17192141W
- Online Computer Library Center (OCLC) ID: 881657225
- Library of Congress Control Number (LCCN): 2014953114
- ISBN-13: 9781593275990
- ISBN-10: 1593275994
- All ISBNs: 1593275994 - 9781593275990
AI-generated Review of “Automate the Boring Stuff with Python”:
"Automate the Boring Stuff with Python" Table Of Contents:
- 1- Acknowledgments
- 2- Introduction
- 3- Whom Is This Book For?
- 4- Conventions
- 5- What Is Programming?
- 6- What Is Python?
- 7- Programmers Don't Need to Know Much Math
- 8- Programming Is a Creative Activity
- 9- About This Book
- 10- Downloading and Installing Python
- 11- Starting IDLE
- 12- The Interactive Shell
- 13- How to Find Help
- 14- Asking Smart Programming Questions
- 15- Summary
- 16- Python Programming Basics
- 17- Python Basics
- 18- Entering Expressions into the Interactive Shell
- 19- The Integer, Floating-Point, and String Data Types
- 20- String Concatenation and Replication
- 21- Storing Values in Variables
- 22- Assignment Statements
- 23- Variable Names
- 24- Your First Program
- 25- Dissecting Your Program
- 26- Comments
- 27- The print() Function
- 28- The input() Function
- 29- Printing the User's Name
- 30- The len() Function
- 31- The str(), int(), and float() Functions
- 32- Summary
- 33- Practice Questions
- 34- Flow Control
- 35- Boolean Values
- 36- Comparison Operators
- 37- Boolean Operators
- 38- Binary Boolean Operators
- 39- The not Operator
- 40- Mixing Boolean and Comparison Operators
- 41- Elements of Flow Control
- 42- Conditions
- 43- Blocks of Code
- 44- Program Execution
- 45- Flow Control Statements
- 46- if Statements
- 47- else Statements
- 48- elif Statements
- 49- while Loop Statements
- 50- break Statements
- 51- continue Statements
- 52- for Loops and the range() Function
- 53- Importing Modules
- 54- from import Statements
- 55- Ending a Program Early with sys.exit()
- 56- Summary
- 57- Practice Questions
- 58- Functions
- 59- def Statements with Parameters
- 60- Return Values and return Statements
- 61- The None Value
- 62- Keyword Arguments and print()
- 63- Local and Global Scope
- 64- Local Variables Cannot Be Used in the Global Scope
- 65- Local Scopes Cannot Use Variables in Other Local Scopes
- 66- Global Variables Can Be Read from a Local Scope
- 67- Local and Global Variables with the Same Name
- 68- The global Statement
- 69- Exception Handling
- 70- A Short Program: Guess the Number
- 71- Summary
- 72- Practice Questions
- 73- Practice Projects
- 74- The Collatz Sequence
- 75- Input Validation
- 76- Lists
- 77- The List Data Type
- 78- Getting Individual Values in a List with Indexes
- 79- Negative Indexes
- 80- Getting Sublists with Slices
- 81- Getting a List's Length with len()
- 82- Changing Values in a List with Indexes
- 83- List Concatenation and List Replication
- 84- Removing Values from Lists with del Statements
- 85- Working with Lists
- 86- Using for Loops with Lists
- 87- The in and not in Operators
- 88- The Multiple Assignment Trick
- 89- Augmented Assignment Operators
- 90- Methods
- 91- Finding a Value in a List with the index() Method
- 92- Adding Values to Lists with the append() and insert() Methods
- 93- Removing Values from Lists with remove()
- 94- Sorting the Values in a List with the sort() Method
- 95- Example Program: Magic 8 Ball with a List
- 96- List-like Types: Strings and Tuples
- 97- Mutable and Immutable Data Types
- 98- The Tuple Data Type
- 99- Converting Types with the list() and tuple() Functions
- 100- References
- 101- Passing References
- 102- The copy Module's copy() and deepcopy() Functions
- 103- Summary
- 104- Practice Questions
- 105- Practice Projects
- 106- Comma Code
- 107- Character Picture Grid
- 108- Dictionaries and Structuring Data
- 109- The Dictionary Data Type
- 110- Dictionaries vs. Lists
- 111- The keys(), values(), and items() Methods
- 112- Checking Whether a Key or Value Exists in a Dictionary
- 113- The get() Method
- 114- The setdefault() Method
- 115- Pretty Printing
- 116- Using Data Structures to Model Real-World Things
- 117- A Tic-Tac-Toe Board
- 118- Nested Dictionaries and Lists
- 119- Summary
- 120- Practice Questions
- 121- Practice Projects
- 122- Fantasy Game Inventory
- 123- List to Dictionary Function for Fantasy Game Inventory
- 124- Manipulating Strings
- 125- Working with Strings
- 126- String Literals
- 127- Indexing and Slicing Strings
- 128- The in and not in Operators with Strings
- 129- Useful String Methods
- 130- The upper(), lower(), isupper(), and islower() String Methods
- 131- The isX String Methods
- 132- The startswith() and endswith() String Methods
- 133- The join() and split() String Methods
- 134- Justifying Text with rjust(), ljust(), and center()
- 135- Removing Whitespace with strip(), rstrip(), and lstrip()
- 136- Copying and Pasting Strings with the pyperclip Module
- 137- Password Locker
- 138- Step 1: Program Design and Data Structures
- 139- Step 2: Handle Command Line Arguments
- 140- Step 3: Copy the Right Password
- 141- Adding Bullets to Wiki Markup
- 142- Step 1: Copy and Paste from the Clipboard
- 143- Step 2: Separate the Lines of Text and Add the Star
- 144- Step 3: Join the Modified Lines
- 145- Summary
- 146- Practice Questions
- 147- Practice Project
- 148- Table Printer
- 149- Automating Tasks
- 150- Pattern Matching with Regular Expressions
- 151- Finding Patterns of Text Without Regular Expressions
- 152- Finding Patterns of Text with Regular Expressions
- 153- Creating Regex Objects
- 154- Matching Regex Objects
- 155- Review of Regular Expression Matching
- 156- More Pattern Matching with Regular Expressions
- 157- Grouping with Parentheses
- 158- Matching Multiple Groups with the Pipe
- 159- Optional Matching with the Question Mark
- 160- Matching Zero or More with the Star
- 161- Matching One or More with the Plus
- 162- Matching Specific Repetitions with Curly Brackets
- 163- Greedy and Nongreedy Matching
- 164- The findall() Method
- 165- Character Classes
- 166- Making Your Own Character Classes
- 167- The Caret and Dollar Sign Characters
- 168- The Wildcard Character
- 169- Matching Everything with Dot-Star
- 170- Matching Newlines with the Dot Character
- 171- Review of Regex Symbols
- 172- Case-Insensitive Matching
- 173- Substituting Strings with the sub() Method
- 174- Managing Complex Regexes
- 175- Combining re.IGNORECASE, re.DOTALL, and re.VERBOSE
- 176- Project: Phone Number and Email Address Extractor
- 177- Step 1: Create a Regex for Phone Numbers
- 178- Step 2: Create a Regex for Email Addresses
- 179- Step 3: Find All Matches in the Clipboard Text
- 180- Step 4: Join the Matches into a String for the Clipboard
- 181- Running the Program
- 182- Ideas for Similar Programs
- 183- Summary
- 184- Practice Questions
- 185- Practice Projects
- 186- Strong Password Detection
- 187- Regex Version of strip()
- 188- Reading and Writing Files
- 189- Files and File Paths
- 190- Backslash on Windows and Forward Slash on OS X and Linux
- 191- The Current Working Directory
- 192- Absolute vs. Relative Paths
- 193- Creating New Folders with os.makedirs()
- 194- The os.path Module
- 195- Handling Absolute and Relative Paths
- 196- Finding File Sizes and Folder Contents
- 197- Checking Path Validity
- 198- The File Reading/Writing Process
- 199- Opening Files with the open() Function
- 200- Reading the Contents of Files
- 201- Writing to Files
- 202- Saving Variables with the shelve Module
- 203- Saving Variables with the pprint.pformat() Function
- 204- Project: Generating Random Quiz Files
- 205- Step 1: Store the Quiz Data in a Dictionary
- 206- Step 2: Create the Quiz File and Shuffle the Question Order
- 207- Step 3: Create the Answer Options
- 208- Step 4: Write Content to the Quiz and Answer Key Files
- 209- Project: Multiclipboard
- 210- Step 1: Comments and Shelf Setup
- 211- Step 2: Save Clipboard Content with a Keyword
- 212- Step 3: List Keywords and Load a Keyword's Content
- 213- Summary
- 214- Practice Questions
- 215- Practice Projects
- 216- Extending the Multiclipboard
- 217- Mad Libs
- 218- Regex Search
- 219- Organizing Files
- 220- The shutil Module
- 221- Copying Files and Folders
- 222- Moving and Renaming Files and Folders
- 223- Permanently Deleting Files and Folders
- 224- Safe Deletes with the send2trash Module
- 225- Walking a Directory Tree
- 226- Compressing Files with the zipfile Module
- 227- Reading ZIP Files
- 228- Extracting from ZIP Files
- 229- Creating and Adding to ZIP Files
- 230- Project: Renaming Files with American-Style Dates to European-Style Dates
- 231- Step 1: Create a Regex for American-Style Dates
- 232- Step 2: Identify the Date Parts from the Filenames
- 233- Step 3: Form the New Filename and Rename the Files
- 234- Ideas for Similar Programs
- 235- Project: Backing Up a Folder into a ZIP File
- 236- Step 1: Figure Out the ZIP File's Name
- 237- Step 2: Create the New ZIP File
- 238- Step 3: Walk the Directory Tree and Add to the ZIP File
- 239- Ideas for Similar Programs
- 240- Summary
- 241- Practice Questions
- 242- Practice Projects
- 243- Selective Copy
- 244- Deleting Unneeded Files
- 245- Filling in the Gaps
- 246- Debugging
- 247- Raising Exceptions
- 248- Getting the Traceback as a String
- 249- Assertions
- 250- Using an Assertion in a Traffic Light Simulation
- 251- Disabling Assertions
- 252- Logging
- 253- Using the logging Module
- 254- Don't Debug with print()
- 255- Logging Levels
- 256- Disabling Logging
- 257- Logging to a File
- 258- IDLE's Debugger
- 259- Go
- 260- Step
- 261- Over
- 262- Out
- 263- Quit
- 264- Debugging a Number Adding Program
- 265- Breakpoints
- 266- Summary
- 267- Practice Questions
- 268- Practice Project
- 269- Debugging Coin Toss
- 270- Web Scraping
- 271- Project: maplt.py with the webbrowser Module
- 272- Step 1: Figure Out the URL
- 273- Step 2: Handle the Command Line Arguments
- 274- Step 3: Handle the Clipboard Content and Launch the Browser
- 275- Ideas for Similar Programs
- 276- Downloading Files from the Web with the requests Module
- 277- Downloading a Web Page with the requests.get() Function
- 278- Checking for Errors
- 279- Saving Downloaded Files to the Hard Drive
- 280- HTML
- 281- Resources for Learning HTML
- 282- A Quick Refresher
- 283- Viewing the Source HTML of a Web Page
- 284- Opening Your Browser's Developer Tools
- 285- Using the Developer Tools to Find HTML Elements
- 286- Parsing HTML with the BeautifulSoup Module
- 287- Creating a BeautifulSoup Object from HTML
- 288- Finding an Element with the select() Method
- 289- Getting Data from an Element's Attributes
- 290- Project: "I'm Feeling Lucky" Google Search
- 291- Step 1: Get the Command Line Arguments and Request the Search Page
- 292- Step 2: Find All the Results
- 293- Step 3: Open Web Browsers for Each Result
- 294- Ideas for Similar Programs
- 295- Project: Downloading All XKCD Comics
- 296- Step 1: Design the Program
- 297- Step 2: Download the Web Page
- 298- Step 3: Find and Download the Comic Image
- 299- Step 4: Save the Image and Find the Previous Comic
- 300- Ideas for Similar Programs
- 301- Controlling the Browser with the selenium Module
- 302- Starting a Selenium-Controlled Browser
- 303- Finding Elements on the Page
- 304- Clicking the Page
- 305- Filling Out and Submitting Forms
- 306- Sending Special Keys
- 307- Clicking Browser Buttons
- 308- More Information on Selenium
- 309- Summary
- 310- Practice Questions
- 311- Practice Projects
- 312- Command Line Emailer
- 313- Image Site Downloader
- 314- 2048
- 315- Link Verification
- 316- Working with Excel Spreadsheets
- 317- Excel Documents
- 318- Installing the openpyxl Module
- 319- Reading Excel Documents
- 320- Opening Excel Documents with OpenPyXL
- 321- Getting Sheets from the Workbook
- 322- Getting Cells from the Sheets
- 323- Converting Between Column Letters and Numbers
- 324- Getting Rows and Columns from the Sheets
- 325- Workbooks, Sheets, Cells
- 326- Project: Reading Data from a Spreadsheet
- 327- Step 1: Read the Spreadsheet Data
- 328- Step 2: Populate the Data Structure
- 329- Step 3: Write the Results to a File
- 330- Ideas for Similar Programs
- 331- Writing Excel Documents
- 332- Creating and Saving Excel Documents
- 333- Creating and Removing Sheets
- 334- Writing Values to Cells
- 335- Project: Updating a Spreadsheet
- 336- Step 1: Set Up a Data Structure with the Update Information
- 337- Step 2: Check All Rows and Update Incorrect Prices
- 338- Ideas for Similar Programs
- 339- Setting the Font Style of Cells
- 340- Font Objects
- 341- Formulas
- 342- Adjusting Rows and Columns
- 343- Setting Row Height and Column Width
- 344- Merging and Unmerging Cells
- 345- Freeze Panes
- 346- Charts
- 347- Summary
- 348- Practice Questions
- 349- Practice Projects
- 350- Multiplication Table Maker
- 351- Blank Row Inserter
- 352- Spreadsheet Cell Inverter
- 353- Text Files to Spreadsheet
- 354- Spreadsheet to Text Files
- 355- Working with PDF and Word Documents
- 356- PDF Documents
- 357- Extracting Text from PDFs
- 358- Decrypting PDFs
- 359- Creating PDFs
- 360- Project: Combining Select Pages from Many PDFs
- 361- Step 1: Find All PDF Files
- 362- Step 2: Open Each PDF
- 363- Step 3: Add Each Page
- 364- Step 4: Save the Results
- 365- Ideas for Similar Programs
- 366- Word Documents
- 367- Reading Word Documents
- 368- Getting the Full Text from a .docx File
- 369- Styling Paragraph and Run Objects
- 370- Creating Word Documents with Nondefault Styles
- 371- Run Attributes
- 372- Writing Word Documents
- 373- Adding Headings
- 374- Adding Line and Page Breaks
- 375- Adding Pictures
- 376- Summary
- 377- Practice Questions
- 378- Practice Projects
- 379- PDF Paranoia
- 380- Custom Invitations as Word Documents
- 381- Brute-Force PDF Password Breaker
- 382- Working with CSV Files and JSON Data
- 383- The csv Module
- 384- Reader Objects
- 385- Reading Data from Reader Objects in a for Loop
- 386- Writer Objects
- 387- The Delimiter and Lineterminator Keyword Arguments
- 388- Project: Removing the Header from CSV Files
- 389- Step 1: Loop Through Each CSV File
- 390- Step 2: Read in the CSV File
- 391- Step 3: Write Out the CSV File Without the First Row
- 392- Ideas for Similar Programs
- 393- JSON and APIs
- 394- The json Module
- 395- Reading JSON with the loads() Function
- 396- Writing JSON with the dumps() Function
- 397- Project: Fetching Current Weather Data
- 398- Step 1: Get Location from the Command Line Argument
- 399- Step 2: Download the JSON Data
- 400- Step 3: Load JSON Data and Print Weather
- 401- Ideas for Similar Programs
- 402- Summary
- 403- Practice Questions
- 404- Practice Project
- 405- Excel-to-CSV Converter
- 406- Keeping Time, Scheduling Tasks, and Launching Programs
- 407- The time Module
- 408- The time.time() Function
- 409- The time.sleep() Function
- 410- Rounding Numbers
- 411- Project: Super Stopwatch
- 412- Step 1: Set Up the Program to Track Times
- 413- Step 2: Track and Print Lap Times
- 414- Ideas for Similar Programs
- 415- The datetime Module
- 416- The timedelta Data Type
- 417- Pausing Until a Specific Date
- 418- Converting Datetime Objects into Strings
- 419- Converting Strings into Datetime Objects
- 420- Review of Python's Time Functions
- 421- Multithreading
- 422- Passing Arguments to the Thread's Target Function
- 423- Concurrency Issues
- 424- Project: Multithreaded XKCD Downloader
- 425- Step 1: Modify the Program to Use a Function
- 426- Step 2: Create and Start Threads
- 427- Step 3: Wait for All Threads to End
- 428- Launching Other Programs from Python
- 429- Passing Command Line Arguments to Popen()
- 430- Task Scheduler, launchd, and cron
- 431- Opening Websites with Python
- 432- Running Other Python Scripts
- 433- Opening Files with Default Applications
- 434- Project: Simple Countdown Program
- 435- Step 1: Count Down
- 436- Step 2: Play the Sound File
- 437- Ideas for Similar Programs
- 438- Summary
- 439- Practice Questions
- 440- Practice Projects
- 441- Prettified Stopwatch
- 442- Scheduled Web Comic Downloader
- 443- Sending Email and Text Messages
- 444- SMTP
- 445- Sending Email
- 446- Connecting to an SMTP Server
- 447- Sending the SMTP 'Hello' Message
- 448- Starting TLS Encryption
- 449- Logging in to the SMTP Server
- 450- Sending an Email
- 451- Disconnecting from the SMTP Server
- 452- IMAP
- 453- Retrieving and Deleting Emails with IMAP
- 454- Connecting to an IMAP Server
- 455- Logging in to the IMAP Server
- 456- Searching for Email
- 457- Fetching an Email and Marking It As Read
- 458- Getting Email Addresses from a Raw Message
- 459- Getting the Body from a Raw Message
- 460- Deleting Emails
- 461- Disconnecting from the IMAP Server
- 462- Project: Sending Member Dues Reminder Emails
- 463- Step 1: Open the Excel File
- 464- Step 2: Find All Unpaid Members
- 465- Step 3: Send Customized Email Reminders
- 466- Sending Text Messages with Twilio
- 467- Signing Up for a Twilio Account
- 468- Sending Text Messages
- 469- Project: "Just Text Me" Module
- 470- Summary
- 471- Practice Questions
- 472- Practice Projects
- 473- Random Chore Assignment Emailer
- 474- Umbrella Reminder
- 475- Auto Unsubscriber
- 476- Controlling Your Computer Through Email
- 477- Manipulating Images
- 478- Computer Image Fundamentals
- 479- Colors and RGBA Values
- 480- Coordinates and Box Tuples
- 481- Manipulating Images with Pillow
- 482- Working with the Image Data Type
- 483- Cropping Images
- 484- Copying and Pasting Images onto Other Images
- 485- Resizing an Image
- 486- Rotating and Flipping Images
- 487- Changing Individual Pixels
- 488- Project: Adding a Logo
- 489- Step 1: Open the Logo Image
- 490- Step 2: Loop Over All Files and Open Images
- 491- Step 3: Resize the Images
- 492- Step 4: Add the Logo and Save the Changes
- 493- Ideas for Similar Programs
- 494- Drawing on Images
- 495- Drawing Shapes
- 496- Drawing Text
- 497- Summary
- 498- Practice Questions
- 499- Practice Projects
- 500- Extending and Fixing the Chapter Project Programs
- 501- Identifying Photo Folders on the Hard Drive
- 502- Custom Seating Cards
- 503- Controlling the Keyboard and Mouse with GUI Automation
- 504- Installing the PyAutoGUI Module
- 505- Staying on Track
- 506- Shutting Down Everything by Logging Out
- 507- Pauses and Fail-Safes
- 508- Controlling Mouse Movement
- 509- Moving the Mouse
- 510- Getting the Mouse Position
- 511- Project: "Where Is the Mouse Right Now?"
- 512- Step 1: Import the Module
- 513- Step 2: Set Up the Quit Code and Infinite Loop
- 514- Step 3: Get and Print the Mouse Coordinates
- 515- Controlling Mouse Interaction
- 516- Clicking the Mouse
- 517- Dragging the Mouse
- 518- Scrolling the Mouse
- 519- Working with the Screen
- 520- Getting a Screenshot
- 521- Analyzing the Screenshot
- 522- Project: Extending the mouseNow Program
- 523- Image Recognition
- 524- Controlling the Keyboard
- 525- Sending a String from the Keyboard
- 526- Key Names
- 527- Pressing and Releasing the Keyboard
- 528- Hotkey Combinations
- 529- Review of the PyAutoGUI Functions
- 530- Project: Automatic Form Filler
- 531- Step 1: Figure Out the Steps
- 532- Step 2: Set Up Coordinates
- 533- Step 3: Start Typing Data
- 534- Step 4: Handle Select Lists and Radio Buttons
- 535- Step 5: Submit the Form and Wait
- 536- Summary
- 537- Practice Questions
- 538- Practice Projects
- 539- Looking Busy
- 540- Instant Messenger Bot
- 541- Game-Playing Bot Tutorial
- 542- Installing Third-Party Modules
- 543- The pip Tool
- 544- Installing Third-Party Modules
- 545- Running Programs
- 546- Shebang Line
- 547- Running Python Programs on Windows
- 548- Running Python Programs on OS X and Linux
- 549- Running Python Programs with Assertions Disabled
- 550- Answers to the Practice Questions
- 551- Chapter 1
- 552- Chapter 2
- 553- Chapter 3
- 554- Chapter 4
- 555- Chapter 5
- 556- Chapter 6
- 557- Chapter 7
- 558- Chapter 8
- 559- Chapter 9
- 560- Chapter 10
- 561- Chapter 11
- 562- Chapter 12
- 563- Chapter 13
- 564- Chapter 14
- 565- Chapter 15
- 566- Chapter 16
- 567- Chapter 17
- 568- Chapter 18
- 569- Index
"Automate the Boring Stuff with Python" Description:
Open Data:
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
Read “Automate the Boring Stuff with Python”:
Read “Automate the Boring Stuff with Python” by choosing from the options below.
Search for “Automate the Boring Stuff with Python” downloads:
Visit our Downloads Search page to see if downloads are available.
Borrow "Automate the Boring Stuff with Python" Online:
Check on the availability of online borrowing. Please note that online borrowing has copyright-based limitations and that the quality of ebooks may vary.
- Is Online Borrowing Available: Yes
- Preview Status: full
- Check if available: The Open Library & The Internet Archive
Find “Automate the Boring Stuff with Python” in Libraries Near You:
Read or borrow “Automate the Boring Stuff with Python” from your local library.
- The WorldCat Libraries Catalog: Find a copy of “Automate the Boring Stuff with Python” at a library near you.
Buy “Automate the Boring Stuff with Python” online:
Shop for “Automate the Boring Stuff with Python” on popular online marketplaces.
- Ebay: New and used books.