July Release Confetti
150+ New Courses, Hands‑On Labs, And
Interactive Learning Activities
Learn More

Python 2.7 Scripting For System Administrators

Training Architect
course instructor image
Keith Thompson
A software craftsman with love for all things Linux. Whether it's writing large scale web applications, automating deployment pipelines, or merely creating scripts to do the tedious work, Keith is always looking to learn and improve himself as an engineer. This love of learning and growth manifested into an insatiable drive to teach and spread his love of technology with others.

Introduction

Continue If You're Interested in Python 2

00:00:28

About the Course Author

00:01:59

Course Tools

00:07:19

Syllabus

00:06:43

Setting Up a Cloud Server Development Environment

00:08:23

Introducing Python

History and Benefits of Python

00:06:20

What's the Deal with Python 3?

00:05:39

Just Enough Python

Introducing the REPL for Rapid Experimentation

00:01:53

Creating and Running Python Scripts

00:02:13

Using Comments in Python

00:01:50

Data Types - Strings and Numbers

00:09:13

Data Types - Booleans and None

00:02:33

Working with Variables

00:02:57

Lists and Tuples

00:13:08

Dictionaries (dicts)

00:06:59

Control Flow - Conditionals and Comparisons

00:07:21

Control Flow - Loops

00:08:31

Control Flow - Logic Operations

00:06:38

Exercise: Creating and Displaying Variables

00:30:00

Exercise: Working with If/Else

00:30:00

Exercise: Iterating Over Lists

00:30:00

Quiz: Python Basics

Scripting with Python

Reading User Input

00:04:53

Encapsulating Behavior Using Functions

00:12:47

Using Standard Library Packages

00:08:05

Working with Environment Variables

00:04:51

Interacting with Files

00:07:13

Parsing Command Line Parameters

00:15:58

Handling Errors with try/except/else/finally

00:10:11

Execute Shell Commands from Within Python

00:08:20

Exit Statuses

00:02:25

Advanced Iteration with List Comprehensions

00:07:47

Standard Library: random & json

00:10:17

Standard Library: shutil & glob

00:12:26

Standard Library: re & math

00:12:23

Exercise: Creating and Using Functions

00:30:00

Exercise: Using the 'os' Package and Environment Variables

00:30:00

Exercise: Creating Files Based on User Input

00:30:00

Exercise: Handling Errors When Files Don't Exist

00:30:00

Exercise: Interacting with External Commands

00:30:00

Exercise: Setting Exit Status on Error

00:30:00

Quiz: Python Scripting and IO

Third Party Packages

Installing 'pip' to Manage Python Packages

00:03:44

Installing Third-Party Packages Using 'pip'

00:07:31

Virtualenv

00:04:38

Using Third-Party Code in Your Scripts

00:07:35

Exercise: Installing Third-Party Packages

00:30:00

Exercise: Utilizing Third-Party Packages

00:30:00

Quiz: Python Packages and Dependencies

Creating a Larger Scripting Project

Examining the Problem and Planning

00:08:52

Structuring the Project

00:13:27

Test Driving the Command Line Parser (Part 1)

00:20:31

Test Driving the Command Line Parser (Part 2)

00:09:38

Implementing PostgreSQL Interaction

00:15:39

Implementing Local File Storage

00:04:57

Implementing S3 Storage

00:09:14

Wiring the Units Together

00:15:13

Building and Sharing a Wheel Distribution

00:06:52

Installing Python 3 on CentOS 7

00:03:41

(Optional) Installing Python 3 on Debian

00:04:13

Testing Against Python 2 and Python 3

00:12:29

Exercise: Creating a Python Project

00:30:00

Exercise: Test Drive CLI Parser

00:30:00

Exercise: Implementing User Management

02:00:00

Exercise: JSON Parsing and Exporting

01:30:00

Exercise: Creating the Console Script

00:30:00

Exercise: Building a Wheel Distribution

00:30:00

Quiz: Python Projects, Testing, and Distribution

Conclusion

Thank You and Next Steps

00:01:23

Details

In this course, you will develop the skills that you need to write effective and powerful scripts and tools using Python. We will go through the necessary features of the Python language to be able to leverage its additional benefits in writing scripts and creating command line tools (data types, loops, conditionals, functions, error handling, and more). Beyond the language itself, you will go through the full development process including project set up, planning, and automated testing to build two different command line tools.

Study Guides

Instructor Deck

Community

Looking For Team Training?

Learn More