CG数据库 >> Python Programming For Network Engineers

Python Programming For Network Engineers的图片1

Python Programming for Network Engineers

English | flv | H264 1280x720 | AAC 2 ch | 7 hrs 20 min | 1.95 GB

eLearning

This course is intended for network engineering professionals who want to take their creative thought processes to the next level by writing code. Whether it’s freeing up time at work by automating simple operational tasks or developing a complete framework for shifting traffic off of routers during scheduled changes, programming is an invaluable skill from which any network engineer will gain immediate returns. This 7-hour course will teach students how to write Python by developing a complete command-line application that will regularly retrieve device configurations, check code in to a version control system, and receive configuration policy violation reports via email. This course is based on Python Release 2.7.

Instructor: John Jensen

Python Programming Course Outline

The Python Programming Environment

Choosing an Operating System

- Operating Systems Supported by Python

- Why Choose Linux

- virtualenv and virtualenvwrapper

Configuring Your Text Editor (PEP 8)

- Indentation

- Spaces Not Tabs

- Source File Encoding

- Comments

The Python Interactive Interpreter

- Running the Interpreter

- Running Code inside the Interpreter

- Learning with the Interpreter

Running Your Python Scripts

- Saving Your Source Files

- Executing Your Source Files

- What does the Shebang (#!) Line Do?

Python Programming For Network Engineers的图片2

Python Fundamentals

The Python Object/Execution Model

- Everything is an Object

- Two Types of Objects

- Statements and Expressions

Variables

- The Traditional Thought Process for a Variable

- Python Variables: Names and Bindings

Data Types

- Strings

- Integers

- Floats

- Lists

- Dictionaries

- Tuples

Control Structures

- if/else/elif Statements

- for loops

- while loops

- Breaking Out of Loops

- The ‘pass’ Statement

Functions

- What is Scope?

- Passing Arguments

- Positional Arguments

- Keyword Arguments

(Slightly) More Advanced Python

Exceptions

- What Are Exceptions

- Why Exceptions Are Awesome

- Catching Exceptions

- The ‘try/finally’ Clause

Working with Files and Directories

- Using ‘open’

- File Object Modes

- File Object Methods

- The ‘with’ Statement

Complex Data Structures

- How to Think About Data

- Example One: A List of Lists

- Example Two: A List of Dictionaries

- Example Three: A Dictionary of Dictionaries

Maintaining State

- Data Serialization Overview

- XML

- YAML

- JSON

- Pickle

- Databases

Modules

- Don’t Reinvent the Wheel – Finding and Using Modules

- Creating Your Own Modules

- Namespaces – A Cautionary Tale

Command-line Arguments

- What’s ARGV Anyway?

- The argparse Module

- Argument Types

Python Programming For Network Engineers的图片3