Training » All Courses » Python » Python

Course Summary

Python Fundamentals is a 4-day training course in the Python language and its many applications. The course covers the language itself, explains object-oriented as well as functional programming techniques, error handling, packaging, system and network programming, many of the Python extensions (libraries), as well as best practices. All concepts are explained through hands-on examples and exercises, so students learn by coding in Python.

Duration

4 days.

Objectives

This is a fast-paced lab course, designed to bring seasoned programmers up-to-speed in Python, as quickly as possible. While attending this course, you will experience:

  • Pythonic thinking.
  • Python's input and output details: stdio and file io.
  • Python's interesting and extra-useful flow-of-control devices.
  • Python's simple and robust error handling.
  • Python's flexible function protocols.
  • Python's memory model.
  • Python's straight-forward object-oriented features.
  • Python's built-in data types: using them, and inheriting from them in classes you design.
  • Python's list comprehensions, decorators, iterators, generators, context managers.
  • Python's scheme for creating and using libraries and packages.
  • Python's handy libraries for many developer/administrator tasks: shutil, tempfile, subprocess, glob, profile, shelve, os, sys, optparse, unittest.
  • Python's architecture, which allows you to get working very quickly with any Python library (there are thousands).

Audience

Students should have prior programming experience and be familiar with basic concepts such as variables/scopes, flow-control, and functions.

Instructors

Photo
Rob has spent 12 years in the software industry in various technical leadership roles from QA and Development Manager to CTO. He has been programming in Python for the last 8 years, including daily use for the last 3. Rob has used Python for everything from small automation tasks to large-scale consumer web applications. Rob is familiar not only with the core libraries but many of the popular frameworks and has deep programming experience in a wide array of other languages. He uses his programming skills in these languages and exposure to many others to creatively draw out analogies for students familiar with other environments. His programming experience ranges from embedded linux device drivers to flex-based GUIs and across applications of all scales. More about Rob Zuber...

Additional Notes

About the Platform

This course can be taught on most major operating systems, which support Python, such as Windows, Linux, Mac OS X, etc.

Trademarks

"Python" is a registered trademark of the Python Software Foundation. All other marks are the properties of their respective owners.

Outline

Output

  • Executing a Python program
  • Syntax: code blocks, colons
  • if, elif and else
  • while and another else
  • Writing to stdout
  • Relational and logical operators

Input

  • Input from stdin
  • Factory functions
  • Catching an exception:
    • yet another else
  • Formatted strings
  • Integer division issue

for range

  • range operator
  • for loop
  • tuples

Functions

  • Function protocols
  • import and reload
  • Module: random
  • Introspection

Scope

  • Indentifier scope
  • Default arguments
  • Keyword arguments

Sequences

  • Sequence types: str, tuple, list
  • Sequence slicing and other manipulations

Important Trick

  • Module: sys
  • Important trick:
    • _name_and_'_main_'
  • Valid identifiers

Comprehensions

  • Scope issues
  • List comprehensions

Dictionaries

  • Importing with from
  • Dictionaries

File IO

  • File I/O
  • Module: os
  • Walking A Directory

Packages

  • Modules: shutil, tempfile
  • Python Packages
  • Debugging 

Dynamic Code

  • Dynamic Code Generation
  • Modules:
    • subprocess
    • glob
    • profile 

Function Fancies

  • Function protocols: variable length argument lists
  • Formatted printing using a dictionary for replacement
  • Unpacking sequences and dictionaries
  • Generators (Optional)
  • Decorators (Optional)

OOP

  • Module: shelve
  • Classes
  • Inheritance
  • Class variable

Overriding

  • Overriding
  • Has-A vs Is-A relationships

New Style Classes

  • Useful attributes
  • Iterators
  • New style classes
  • Attribute control (Optional)
  • property (Optional)
  • Static methods (Optional)
  • Class methods (Optional)
  • Diamond inheritance (Optional)

Developer Modules

  • Context Manager class
  • Module: unittest
  • Module: optparse

Wrap Up

  • Exceptions
  • Namespaces
  • Nests
  • Pitfalls
  • Finding Modules and Help

re Module

  • re - Regular Expressions
  • Search and replace
  • Named groups

re Syntax

  • Regular expression syntax
  • Testing regular expressions

Course Testimonials

This was an excellent course, well-designed for the audience, with appropriate pacing. Marilyn is an incredible instructor -- it was clear that she's been doing this for a long time. I enjoyed her humor and her depth of knowledge.

- Nuance Communications

Instructor sat with students and aided/taught as student programmed - excellent

- IMC Chicago

Excellent coverage of the techniques and pitfalls of Python Programming using extensive examples and code walk-through's.

- Ujanen Inc.