We may earn an affiliate commission when you visit our partners.
Course image
Udemy logo

Automate the Boring Stuff with Python Programming

Al Sweigart

If you're an office worker, student, administrator, or just want to become more productive with your computer, programming will allow you write code that can automate tedious tasks. This course follows the popular (and free. ) book, Automate the Boring Stuff with Python.

Read more

If you're an office worker, student, administrator, or just want to become more productive with your computer, programming will allow you write code that can automate tedious tasks. This course follows the popular (and free. ) book, Automate the Boring Stuff with Python.

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.

This course is for complete beginners and covers the popular Python programming language. You'll learn basic concepts as well as:

  • Web scraping
  • Parsing PDFs and Excel spreadsheets
  • Automating the keyboard and mouse
  • Sending emails and texts
  • And several other practical topics

By the end of this course, you'll be able to write code that not only dramatically increases your productivity, but also be able to list this fun and creative skill on your resume.

Enroll now

What's inside

Learning objectives

  • Automate tasks on their computer by writing simple python programs.
  • Write programs that can do text pattern recognition with "regular expressions".
  • Programmatically generate and update excel spreadsheets.
  • Parse pdfs and word documents.
  • Crawl web sites and pull information from online sources.
  • Write programs that send out email notifications.
  • Use python's debugging tools to quickly figure out bugs in your code.
  • Programmatically control the mouse and keyboard to click and type for you.

Syllabus

Learn the basic programming terminology and how to use IDLE's interactive shell and file editor.

This lecture explains what programming is good for, even if you don't intend to become a software engineer. At the end of this lecture, you'll be able to download and install Python and be ready to learn to code.

Read more

This quiz is here just to ensure you know about the website where you can find the Automate the Boring Stuff with Python book for free: https://automatetheboringstuff.com.

You don't need to purchase the book, and you can read it online if you want more information on the topics in this course.

The student will learn how to put values and operators together to form expressions, the most basic instruction type in Python.

Now that you've done some basic instructions in the interactive shell, let's use the file editor to write a complete program.

Lecture 2 Quiz
Use the Python flow control statements to control the order that Python instructions are executed, including if/else, while loops, and for loops.

You've made Python execute instructions, now learn how to make Python choose which instructions to execute.

The if/else statements are the basic instruction for letting your Python programs make decisions.

Loops allow your program to execute the same code over and over again.

The while loop will execute the same code over and over as long as some condition is true, but for loops allow you to execute a set number of iterations of a loop.

Become familiar with Python's basic built-in functions, along with how to create your own functions.

You don't have to write every bit of code yourself. Python comes with several functions that your program can call to leverage the code that others have written.

You aren't limited to the functions that come with Python. You can define your own functions using the def statement. Grouping code into functions helps make your programs shorter and easier to debug.

Functions also introduce the concept of scopes. Learn the difference between global scope and local scopes for variables.

Use try/except statements can handle errors without crashing your program.

Instead of crashing, you can have your programs gracefully handle errors as they come up.

Combine all the previous concepts to make a full program. In this case, creating a "Guess the Number" game from scratch.

You've learned several basic programming concepts. Let's apply them to make a simple "Guess the Number" game.

Use list data type to store multiple values in one variable, and know when this useful.

Lists are values that themselves can contain multiple values. Learn how lists can expand your programs' capabilities.

There are several instructions that can be used with lists. This lecture introduces multiple assignment and revisits for loops.

You don't have to write basic operations from scratch. Instead, learn about the methods that the list data type already comes with.

Most of the things you've learned about lists also apply to strings. Two for one!

Use the dictionary data type to create more complicated data structures.

Dictionaries also can contain multiple values. By using key-value pairs, you can begin to organize large amounts of data.

Dictionaries and lists can contain multiple values, including other dictionaries and lists. Combining them together you can organize your data into data structures.

Recognize alternate syntax for strings, and when they are used in Python programs.

There's much more to strings than concatenating and printing them. This lecture covers the other ways that strings can be represented in your Python code and why you would use these alternate forms.

There are lots of useful and common things you'll want to do with strings, but you don't have to write the code to do them yourself. Python comes with string methods for many basic operations.

String concatenation can become a mess of characters that makes your code hard to read. String formatting offers a simpler way to put strings together.

Launch your Python programs from outside of IDLE.

Once your programs are finished, you won't always want to launch IDLE every time you want to run them. This lecture covers how to create shortcuts for your programs on Windows. Mac and Linux are covered in the course notes.

Use regular expressions to find and replace patterns of text.

Regular expressions offer a way to not only search for text, but to search for patterns of text. This is a large step in increasing the power of your programs.

In this lesson, you learn how the pipe regex character allows you to search for one of multiple patterns.

In this lesson, you'll learn how to find repeating patterns and know the difference between regular expressions that do greedy-matching and nongreedy-matching.

While the familiar search() method returns the first match of the regex's pattern, the findall() method returns all matches of the pattern. This lesson also explores character classes: a handy shortcut for specifying alternatives in regex pattern.

The regex dot-star is a common "catch all" pattern that you can use in your regular expressions. This lesson also explores matching patterns at the start or end of a string.

Regular expressions can not only find text patterns, but can also perform fin-and-replace for text patterns. The sub() method lets us make these text substitutions.

At this point, we'll combine our knowledge of regular expressions to create a script that can pull phone numbers and email addresses out of a document.

Write Python code that can copy, move, rename, and delete files, as well as save data to files.

Files are stored in a hierarchical system of folders on your hard drive. In this lesson, you'll learn how to refer to specific files through absolute and relative file paths.

Python lets you write out text to files and read text in from files. This allows you to have data from your programs persist even after they've shut down.

Python can copy, move, and rename files with your given criteria much faster than you could do this by dragging file icons in a File Explorer program. This lesson covers functions to perform basic file operations.

Writing scripts to delete files can be a useful, but dangerous, feature to add to your programs. This lesson teaches you how you can keep bugs in your programs from causing any real damage.

"Walking a directory tree" is performing file operations not just on every file in a folder, but every file in every subfolder of that folder, and every subfolder of those subfolders, and so on. Normally this requires learning about recursion, but Python's os.walk() function makes this easy.

Use Python's tools to find and fix bugs in your code more efficiently.

Assertions allow you to add "sanity checks" to your code. They won't fix bugs, but they will detect them early on and make the fix easier.

It's tempting to just add print() calls to help debug your programs, but Python's logging module offers a more powerful and convenient way to display debugging information.

All software developers eventually write bugs into their programs. The debugger is the main tool for finding and fixing bugs in every programmer's toolbox.

Write Python scripts that can access web sites and control the web browser.

In this lesson, you'll learn about Python's webbrowser module. Although it's limited to opening up browser windows, this lesson explores how this can be used in a handy map script.

Being on the computer often means being on the internet. In this lesson, you'll learn how to use the Requests module to download files from the web.

While regular expressions are good for general text, the HTML-formatted text that make up the web pages your programs can download requires something more specific. The Beautiful Soup module has functions are locating information on a web page and extracting it for your programs.

The Selenium module provides the ultimate web scraping tool: it launches a browser that is controllable from your Python code.

Write Python scripts that can read and edit Excel, Word, and PDF documents.

Excel spreadsheets can be read just like any other file. In this lesson, you'll use the OpenPyXL module to extract data from spreadsheets.

This lesson continues with the OpenPyXL module to create or edit Excel spreadsheets.

PDFs are a ubiquitous format for reports and business information. In this lesson you'll learn how to make your Python programs interact with PDF files.

Python can read and modify Word documents, including Word's styles and text-formatting features.

Write Python scripts that can send and retrieve email.

Your Python scripts can automatically send out emails. This is a great for adding a notification feature to your programs so you can leave them running while you're away from your computer.

Python scripts can also log in to your email accounts for you to check your inbox and retrieve messages on your behalf.

Write Python scripts that can control the keyboard and mouse to interact with other programs.

When there's no other way to programmatically control an app on your computer, your Python scripts can take control of the mouse and keyboard to automate clicking and typing for you.

This lesson continues GUI automation by exploring how Python can control the keyboard.

While controlling the mouse and keyboard for input is great, your scripts will be blind until they can read the screen. This lesson covers PyAutoGUI's image recognition functions, and shows off a game-playing bot that you could make from the things you learned in the last three lessons.

You've made it to the end of the course. This lecture has further reading that you can continue your programming journey with.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Meant to rapidly increase productivity, this course teaches basic programming concepts and practical automation skills
Students are not required to know sorting algorithms or object-oriented programming
This course covers web scraping, parsing PDFs and Excel spreadsheets, and sending emails and texts
Uses the book 'Automate the Boring Stuff with Python,' which is free online
Teaches how to use Python's debugging tools to fix bugs in code
Taught by Al Sweigart, a renowned Python programmer and author

Save this course

Save Automate the Boring Stuff with Python Programming to your list so you can find it easily later:
Save

Career center

Learners who complete Automate the Boring Stuff with Python Programming will develop knowledge and skills that may be useful to these careers:
Web Developer
Web Developers design and develop websites. This course can help you learn the basics of web development, including HTML, CSS, and JavaScript.
Software Engineer
Software Engineers design, develop, and maintain software applications. This course can help you learn the basics of programming, which is a core skill for Software Engineers.
Computer Scientist
Computer Scientists design and develop new computing technologies. This course can help you learn the basics of programming and computer science, which are essential skills for this role.
Operations Research Analyst
Operations Research Analysts use their knowledge of programming and mathematics to solve business problems. This course can help you build a foundation in programming, which is essential for success in this role.
Statistician
Statisticians use their knowledge of programming and statistics to collect, analyze, and interpret data. This course can help you build a foundation in programming, which is essential for success in this role.
Data Analyst
Data Analysts use their knowledge of programming to clean, analyze, and interpret data. This course can help you build a foundation in programming, which is essential for success in this role.
Information Security Analyst
Information Security Analysts design and implement security systems to protect computer networks and data. This course can help you learn the basics of programming and information security, which are essential skills for this role.
Financial Analyst
Financial Analysts use their knowledge of programming and finance to analyze financial data and make investment recommendations. This course can help you build a foundation in programming, which is essential for success in this role.
Actuary
Actuaries use their knowledge of programming and mathematics to assess risk and develop insurance products. This course can help you build a foundation in programming, which is essential for success in this role.
Epidemiologist
Epidemiologists use their knowledge of programming and statistics to investigate and control diseases. This course can help you build a foundation in programming, which is essential for success in this role.
Biostatistician
Biostatisticians use their knowledge of programming and statistics to analyze biological data. This course can help you build a foundation in programming, which is essential for success in this role.
Data Scientist
Data Scientists use their knowledge of programming and statistics to analyze data and solve business problems. This course can help you build a foundation in programming, which is essential for success in this role.
Robotics Engineer
Robotics Engineers design, build, and maintain robots. This course can help you learn the basics of programming and robotics, which are essential skills for this role.
Machine Learning Engineer
Machine Learning Engineers design and develop machine learning models. This course can help you learn the basics of programming and machine learning, which are essential skills for this role.
Business Analyst
Business Analysts use their knowledge of programming and business to analyze business problems and develop solutions. This course can help you build a foundation in programming, which is essential for success in this role.

Reading list

We've selected 16 books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Automate the Boring Stuff with Python Programming.
Is the original source material for the course itself. It is written for beginners with no prior programming experience and covers a wide range of practical topics, making it an excellent resource for those who want to learn how to use Python for everyday tasks.
Provides a comprehensive introduction to Python programming, covering basic concepts, data structures, and object-oriented programming. It valuable resource for beginners who want to learn the fundamentals of Python.
Provides a comprehensive introduction to agile software development. It covers topics such as agile principles, Scrum, and Kanban. It good choice for programmers of all levels who want to learn how to develop software using agile methods.
Provides a more comprehensive and theoretical introduction to Python, covering topics such as data structures, algorithms, and object-oriented programming. It good choice for those who want to learn the fundamentals of computer science and how Python can be used to solve programming problems.
Provides a comprehensive and in-depth introduction to Python 3. It covers a wide range of topics, from basic concepts to advanced features. It good choice for those who want to learn the fundamentals of Python 3 and how to use it to solve programming problems.
Provides practical advice on how to write clean and maintainable code. It covers topics such as code organization, naming conventions, and testing. It good choice for programmers of all levels who want to improve the quality of their code.
Provides practical advice on how to refactor existing code to improve its design and maintainability. It covers topics such as code smells, refactoring patterns, and test-driven development. It good choice for programmers of all levels who want to improve the quality of their code.
Provides a comprehensive introduction to design patterns. It covers a wide range of patterns, from creational patterns to structural patterns to behavioral patterns. It good choice for programmers of all levels who want to learn how to design and develop reusable and maintainable software.
Contains a large number of practical recipes for solving common Python programming problems. It valuable resource for Python programmers of all levels, providing solutions to everyday programming challenges.
Focuses on teaching Pythonic programming style and best practices. It valuable resource for those who want to improve their Python skills and write more idiomatic and efficient code.
Provides a comprehensive introduction to Python for data analysis, covering topics such as data wrangling, data visualization, and machine learning. It good choice for those who want to learn how to use Python for data-related tasks.
Provides a comprehensive introduction to machine learning using Python. It covers a wide range of topics, from supervised learning to unsupervised learning to deep learning. It good choice for those who want to learn how to use Python for machine learning tasks.
Provides a quick reference to the Python language and standard library. It valuable resource for Python programmers of all levels, providing quick access to information on syntax, functions, and modules.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Here are nine courses similar to Automate the Boring Stuff with Python Programming.
Fundamentals of Building Office Add-ins with Office...
Most relevant
Scratch Game Programming
Office Productivity Software and Windows Fundamentals  
Linux Mastery: Master the Linux Command Line in 11.5 Hours
Get Started with Spreadsheet Applications: Excel
Get Started with Presentation Applications: PowerPoint
Get Started with Word Processing Applications: Word
Get Started with Messaging & Collaboration Apps:...
Mastering Microsoft Power Automate 2024: From Zero to Hero
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2024 OpenCourser