Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Google

Using Python to Interact with the Operating System

Google via Google Skills

Overview

Build a Learning Habit
Download Class Central's free printable study calendar
Download for Free
Learn to execute Python locally, organize code across files, read and write various file types, and utilize subprocesses and input streams. Develop Bash scripts and regular expressions, essential tools for system work. This course also covers automatic testing and setting up your developer environment. This is the second course in the Google IT Automation with Python Certificate, a series designed to prepare you for an entry-level IT Support Specialist role.

Syllabus

  • Getting Your Python On
    • Course Introduction
    • Welcome to the Course
    • Intro to Module 1: Getting Your Python On
    • Getting Familiar with the Operating System
    • Getting Your Computer Ready for Python
    • Setting up Your Environment on Windows (Optional)
    • Setting up Your Environment on MacOS (Optional)
    • Setting up Your Environment on Linux (Optional)
    • Pointers for Getting Your Environment Setup
    • Practice Quiz: Getting Ready for Python
    • Interpreted vs. Compiled Languages
    • How to Run a Python Script
    • Your Own Python Modules
    • What is an IDE?
    • Setting up Your Environment
    • Virtual environments
    • Practice Quiz: Running Python Locally
    • Benefits of Automation
    • Pitfalls of Automation
    • Practical Automation Example
    • Is it worth the time?
    • Practice Quiz: Automation
    • Module 1 Wrap Up: Getting Your Python On
    • Glossary terms from Course 2, Module 1
    • Graded Quiz: Module 1 challenge: Getting your Python on
  • Managing Files with Python
    • Programming with Files
    • Review: Reading files
    • Reading Files
    • Review: Iterating through files
    • Iterating through Files
    • Review: Writing files
    • Writing Files
    • Study guide: Reading and writing files
    • Practice Notebook: Text Files
    • File paths
    • Review: How to write file paths in code
    • How to write file paths in code
    • Practice Quiz: Writing File Paths
    • Review: Working with files
    • Working with Files
    • Review: More file information
    • More File Information
    • Review: Directories
    • Directories
    • Study guide: Files and directories
    • Practice Quiz: Managing Files & Directories
    • Practice Lab: Managing Files & Directories
    • What is a CSV file?
    • Review: Reading CSV files
    • Reading CSV Files
    • Review: Generating CSV
    • Generating CSV
    • Review: Reading and writing CSV files with dictionaries
    • Reading and writing CSV Files with Dictionaries
    • Study guide: .csv files
    • Practice Quiz: Reading & Writing CSV Files
    • Practice Lab: Reading & Writing CSV Files
    • What is Qwiklabs?
    • Qwiklabs guidelines and troubleshooting steps
    • Handle Files
    • Exemplar: Handling Files
    • Glossary terms from course 2, module 2
    • Module 2 Wrap Up: Managing Files with Python
    • Graded Quiz: Module 2 challenge: Handling Files
  • Regular Expressions
    • Intro to Module 3: Regular Expressions
    • What are regular expressions?
    • Review: Why use regular expressions?
    • Why use regular expressions?
    • Basic Matching with grep
    • Practice Quiz: Regular Expressions
    • Review: Simple matching in Python
    • Simple Matching in Python
    • Review: Wildcards and Character Classes
    • Wildcards and Character Classes
    • Review: Repetition Qualifiers
    • Repetition Qualifiers
    • Review: Escaping Characters
    • Escaping Characters
    • Review: Regular Expressions in Action
    • Regular Expressions in Action
    • Study guide: Regular expressions
    • Practice Quiz: Basic Regular Expressions
    • Practice Lab: Basic Regular Expressions
    • Review: Capturing Groups
    • Capturing Groups
    • Review: More on repetition qualifiers
    • More on Repetition Qualifiers
    • Review: Extracting a PID using regexes in Python
    • Extracting a PID Using regexes in Python
    • Review: Splitting and Replacing
    • Splitting and Replacing
    • Study guide: Advanced regular expressions
    • Practice Quiz: Advanced Regular Expressions
    • Practice Lab: Advanced Regular Expressions
    • Module 3 Wrap Up: Regular Expressions
    • Glossary terms from course 2, module 3
    • Work with Regular Expressions
    • Exemplar: Work with regular expressions
    • Graded Quiz: Module 3 challenge: Work with Regular Expressions
  • Managing Data and Processes
    • Intro to Module 4: Managing Data and Processes
    • Review: Reading data interactively
    • Reading data interactively
    • Review: Standard streams
    • Standard Streams
    • Review: Environment variables
    • Environment Variables
    • Review: Command-Line Arguments and Exit Status
    • Command-Line Arguments and Exit Status
    • More About Input Functions
    • Practice Quiz: Data Streams
    • Review: Running system commands in Python
    • Running System Commands in Python
    • Review: Obtaining the output of a system command
    • Obtaining the Output of a System Command
    • Review: Advanced subprocess management
    • Advanced Subprocess Management
    • Study guide: Python subprocesses
    • Practice Quiz: Python Subprocesses
    • What are log files?
    • Review: Filtering log files with regular expressions
    • Filtering Log Files with Regular Expressions
    • Review: Making sense out of the data
    • Making Sense out of the Data
    • Practice Quiz: Processing Log Files
    • Module 4 Wrap Up: Managing Data and Processes
    • Glossary terms from course 2, module 4
    • Work with Log Files
    • Exemplar: Work with log files
    • Graded Quiz: Module 4 challenge: Working with log files
  • Testing in Python
    • Intro to Module 5: Testing in Python
    • What is testing?
    • Manual Testing and Automated Testing
    • Practice Quiz: Simple Tests
    • unittest
    • pytest
    • Comparing unittest and pytest
    • Review: Unit tests
    • Unit Tests
    • Review: Writing unit tests in python
    • Writing Unit Tests in Python
    • Review: Edge cases
    • Edge Cases
    • Review: Additional test cases
    • Additional Test Cases
    • Study guide: Unit tests
    • Help with Jupyter Notebooks
    • Unit Tests: Practice Jupyter Notebook
    • Black Box vs. White Box
    • Other Test Types
    • Test-Driven Development
    • More About Tests
    • Practice Quiz: Other Test Concepts
    • Review: The Try-Except concept
    • The Try-Except Construct
    • Review: Raising errors
    • Raising Errors
    • Review: Testing for expected errors
    • Testing for Expected Errors
    • Study guide: Handling errors
    • Errors & Exceptions: Practice Notebook
    • Module 5 Wrap Up: Testing in Python
    • Glossary terms from course 2, module 5
    • Implement Unit Testing
    • Exemplar: Implementing unit testing
    • Graded Quiz: Module 5 challenge: Implementing Unit Testing
  • Bash Scripting
    • Intro to Module 6: Bash Scripting
    • Review: Basic Linux commands
    • Basic Linux Commands
    • Review: Redirecting streams
    • Redirecting Streams
    • Review: Pipes and pipelines
    • Pipes and Pipelines
    • Review: Signaling processes
    • Signaling Processes
    • Study guide: Basic Linux commands
    • Redirections, Pipes, and Signals
    • Practice Quiz: Interacting with the Command Line
    • Review: Creating Bash scripts
    • Creating Bash Scripts
    • Review: Using variables and globs
    • Using Variables and Globs
    • Review: Conditional execution in Bash
    • Conditional Execution in Bash
    • Bash Scripting Resources
    • Practice Quiz: Bash Scripting
    • Review: While loops in Bash scripts
    • While Loops in Bash Scripts
    • Review: For loops in bash scripts
    • For Loops in Bash Scripts
    • Review: Advanced Command Interaction
    • Advanced Command Interaction
    • Review: Choosing between Bash and Python
    • Choosing Between Bash and Python
    • Practice Quiz: Advanced Bash Concepts
    • Module 6 Wrap Up: Bash Scripting
    • Glossary terms from course 2, module 6
    • Edit Files using Substrings
    • Exemplar: Edit files using substrings
    • Graded Quiz: Module 6 challenge: Edit Files Using Substrings
    • IT skills in action reading
  • Final Project
    • Intro to Your Final Project
    • Writing a Script from the Ground Up
    • Project Problem Statement
    • Help with Research and Planning
    • Log Analysis with Regular Expressions
    • Exemplar: Log analysis using regular expressions
    • Graded Quiz: Module 7 challenge: Log Analysis Using Regular Expressions
    • Congratulations!
    • Course 2 Glossary
    • Sneak Peek of the Next Course
    • Course 2 resources and citations

Reviews

Start your review of Using Python to Interact with the Operating System

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.