Automate The Boring Stuff With Python

Posted : admin On 1/25/2022
  • Automate the Boring Stuff with Python was written for people who want to get up to speed writing small programs that do practical tasks as soon as possible. You don’t need to know sorting algorithms or object-oriented programming, so this course skips all the computer science and concentrates on writing code that gets stuff done.
  • Automate the Boring Stuff With Python, Chapter 4 Exercise. Ask Question Asked 5 years, 11 months ago. Active 4 months ago. Viewed 26k times 9. I'm newbie and doing.

The second edition of 'Automate the Boring Stuff with Python' is almost out! You can preorder it on the No Starch Press website, where buying the print book will get you DRM-free ebooks in PDF, epub, and Kindle formats for free.

The second edition is about 100 pages longer than the first, with new chapters, programming projects, and revised editing. The third party module coverage has been updated to the latest available version (including OpenPyXL).

Like the first edition, the second edition will be released under a Creative Commons license and will be free to read online. The estimated online release is early November on the https://automatetheboringstuff.com.

Some of the new content includes:

Get 80% off the full course from this link: the print book here: https://www.amazon.com/gp/product//r.

  • The Mu editor - The second edition switches from IDLE to Mu, an editor specifically designed for education and beginners. Watch Nicholas Tollervey present Mu at PyCon 2018.
  • Explanation of the call stack - A description of the call stack, which helps the reader understand global and local scopes.
  • The enumerate() function - Using enumarate() in for loops and its advantages over using range().
  • The random.choice() and random.shuffle() functions - These functions in the random module weren't covered before.
  • Identity and the id() function - Added to help explain references and in-place modification.
  • The partition() method - A useful string method similar to join().
  • New chapter: PyInputPlus and input validation - Covers a third party module, PyInputPlus, for input validation and why input validation is important.
  • The pathlib module and Path objects - Explores a new, versatile way to write code that interacts with the file system.
  • OpenPyXL updates - This third party module made several backwards-incompatible changes, confusing some readers who installed the latest version instead of the version in the book. This chapter has been updated to the latest version.
  • New chapter: Working with Google Sheets - A new chapter covering the EZSheets module, allowing your Python scripts to read and update spreadsheets on Google Sheets.
  • New module: EZGmail - The email/SMS chapter now features the EZGmail module, which allows Python scripts to interact with Gmail accounts. Previously this was much more difficult to do via the smtplib and imapclient modules.
  • SMS email gateways - A new section on how to send SMS text messages via the phone carrier's email gateways. Now your Python scripts won't need to use a service such as Twilio to send occasional text messages.
  • MouseInfo app - A small GUI application that is a part of PyAutoGUI which reveals the current coordinates of the mouse. This information is useful for planning out GUI automation tasks.
  • The PyGetWindow module - A new module included in PyAutoGUI that retrieves the coordinates, size, and status of the desktop windows for running programs.
  • The PyMsgBox module - A new module included in PyAutoGUI that provides popup message boxes for your program when it needs to get the attention of the user.
  • Requirements.txt files - Available text files that make it easy to install the exact versions of the modules that the book covers. (See below.)

New projects and programs include:

Boring
  • 'Rock, Paper, Scissors' game - The source code for a simple rock, paper, scissors game.
  • 'Zig Zag' program - A small animation program to produce a zig zag line.
  • 'Conway's Game of Life' program - The source code to the classic cellular automata program.
  • 'Pig Latin' program - The source code for an 'igpay atinlay' text converter.
  • 'Zombie Dice' simulation - Instructions how to write your own bots that play the game Zombie Dice against each other.
  • Date Detection practice project - An exercise for using regular expressions to parse dates.
  • 'How to Keep an Idiot Busy for Hours' program - The source code for a joke program.
  • 'Multiplication Quiz' program - The source code for a math quiz program.
  • Practice projects: 'Sandwich maker' and 'Write your own multiplication quiz' - Exercises for using the PyInputPlus module.

To avoid installing third-party module versions that the book doesn't cover, I'm making available several requirements.txt files so that pip can easily install the exact versions that the book covers. Download the file for your operating system:

  • automate-win-requirements.txt for Windows
  • automate-mac-requirements.txt for macOS
  • automate-linux-requirements.txt for Linux

To install, download the file for your operating system. Then open a terminal or command prompt window and run pip install -r automate-<your os>-requirements.txt. If you're using pipenv to create a virtual environment, you'll need to run pipenv install -r automate-<your os>-requirements.txt.

Note that PyAutoGUI requires Pillow, which currently doesn't support Python 3.8 yet.

If you have questions about the second edition or its content, you can post them on the /r/inventwithpython subreddit.

Learn to program with my books for beginners, free under a Creative Commons license:

Take my Automate the Boring Stuff with Python online Udemy course. Use this link to apply a 60% discount.

By Al Sweigart. Free to read under a Creative Commons license.

New Book: 'Beyond the Boring Stuff with Python'

You've read a beginner resource like Automate the Boring Stuff with Python or Python Crash Course, but still don't feel like a 'real' programmer? Beyond the Basic Stuff with Python covers software development tools and best practices so you can code like a professional.

Second Edition of Automate the Boring Stuff with Python


Purchase directly from the publisher to get free PDF, Kindle, and epub ebook copies.
Buy on Amazon

Automate The Boring Stuff With Python Git


Use this link to sign up for the Automate the Boring Stuff with Python online course on Udemy.
Preview the first 15 of the course's 50 videos for free on YouTube.
'The best part of programming is the triumph of seeing the machine do something useful. Automate the Boring Stuff with Python frames all of programming as these small triumphs; it makes the boring fun.'
- Hilary Mason, Founder of Fast Forward Labs and Data Scientist in Residence at Accel
'I'm having a lot of fun breaking things and then putting them back together, and just remembering the joy of turning a set of instructions into something useful and fun, like I did when I was a kid.'
- Wil Wheaton, WIL WHEATON dot NET

Practical programming for total beginners.

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 in Automate the Boring Stuff with Python.

Udemy Online Video Course

The Automate the Boring Stuff with Python Programming online course on Udemy covers most of the content of the book. If you'd prefer a video format for learning to program, you can use this link to get a 70% discount. You will have lifetime access to the course content and can post questions to the course's forums.

You can preview the first 15 of the course's 50 videos on YouTube for free.

Table of Contents

Automate The Boring Stuff With Python 2nd

Additional Content

Automate The Boring Stuff With Python Pdf

About the Author

Automate The Boring Stuff With Python Pdf Download

Al Sweigart is a software developer and teaches programming to kids and adults. He has written several books for beginners, including Scratch Programming Playground, Cracking Codes with Python, Invent Your Own Computer Games with Python, and Making Games with Python & Pygame

Automate The Boring Stuff With Python Web Scraping How To Open Maps

Support the author by purchasing the print/ebook bundle from No Starch Press or separately on Amazon.

Automate The Boring Stuff With Python Programming

Read the author's other Creative Commons licensed Python books.