Python

Introduction to Python Programming for Network Engineers!!

This course will provide a gentle introduction to programming concepts and will cover the benefits of learning how to program, why Python is a great language to learn, and the software development lifecycle at a very high level. The course will also cover a brief history of past methods of automated interactions with network hardware, and compare those methods with more modern methods available today, such as NETCONF as well as embedded Python interpreters in network hardware operating systems. This course is based on Python Release 2.7.

Introductory course for Python

  • 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 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