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.
Note: The programs in this book are written to run on Python 3.
"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
"Do you need Automate the Boring Stuff with Python? Yes, if you want to enhance your workflow by using automation, this is an excellent place to start. Highly recommended."—Network World
About the Author
Al Sweigart is a software developer and teaches programming to kids and adults. He has written several Python books for beginners, including Hacking Secret Ciphers with Python, Invent Your Own Computer Games with Python, and Making Games with Python & Pygame.
Most helpful customer reviews
240 of 250 people found the following review helpful.
Excellent Book for Beginners and More
By Nicholas Sarlo
Introductions to python are easy to find -- but at the end of the day most python tutorials for beginners end up being the same lessons repackaged, often leaving the new programmer with gaping holes in how their newly acquire skills can be applied practically. This is not one of those books.
The book begins with the essential skills and concepts necessary to build a solid foundation in not only python, but programming in general. The introduction is thorough, easy to follow, and broken down with enough examples for even the newest of programmers to digest. Those who found Learn Python the Hard Way a little frustrating will like the much more broken down process used in this book.
But where this book stands out is the second part where you actially build useful tools you might need to use everyday. The author does a fantastic job of bridging the concepts and skills you learned earlier to real world applications, without skipping many of the important things other tutorials ignore like regex.
Whether it's organizing files, working with spreadsheets, or even sending e-mail and text messages, the book introduces programming concepts to the reader through real world applications they can build and use immediately. While programming puzzles and challenges are fun and necessary to an extent, there is little more satisfying to a new engineer than building something that can actually do something useful.
One of the biggest hurdles new programmers face is not knowing where to go or what to build after their introductions. Even more so, they do not know necessarily how to apply their new skills. For those more interested in day-to-day applications than building games, this is an amazing place to learn by building with python. I would recommend this for any new programmers, and even those who are interested in exploring what they can build with their foundation.
111 of 117 people found the following review helpful.
Great programming language for beginners and experts, very steady and practical approach to learning it.
By W. Petersen
I'm an electrical engineer who programs a lot both at my job and at home. My non-programmer sister wants to learn how to code and I was interested in learning Python both for work and hobbies, so I picked this up to teach myself and evaluate as a gift for her. Needless to say, I'm pretty satisfied with it and I expect that my sister will be too.
Python is a fantastic language for beginning programmers and Sweigart does a great job of explaining it. The only beef I had with it is that some of the humor in the book may interfere with comprehension. Humor is great to keep readers engaged and help prevent them from stressing out about stuff that can be intimidating, but there are a few times here where I felt the quality of explanation suffered a little to squeeze in a joke or geek-culture reference. Note that my complaint is minor enough to not warrant taking a star off of the rating.
The book's focus on automation in the second half is fantastic. Most other programming books that I have used are no where near as pragmatic and it's great to be able to apply your new knowledge to your own life immediately. I also recommend this book to anyone who has a boring job sitting in front of a computer all day. Learn to automate your tasks and do a month of work in a day.
43 of 45 people found the following review helpful.
See all 226 customer reviews...
Provides good foundation on python automation
By N. Dunham
It is a decent enough book, but a surprising amount of the python code is outdated and functions have been replaced by the developers of python, pyxl and other python modules referenced in this book. It would be nice to see some updates.
Ignoring outdated modules in the examples, the author does a great job of explaining why python is important and gives so many ideas on how computing tasks can be greatly simplified, by accessing API's from software (like MS Office) that we use all of the time. This information provides an excellent foundation into python and the automation of tasks that make python such a powerhouse.
Overall, this is good book; the foundation is great, while the examples are below average due to the outdated functions used in the examples.