This class is for programmers who are already experienced with another programming
language such as C, C++, Java, Perl, PHP, etc. Some prior experience
with Python is recommended, but not required as long as you are
familiar with common programming concepts. [ Am I prepared? ]
Next Course Date:
Instructor: David Beazley
[ Register | More Information |FAQ]
- A printed copy of the course notes.
- A copy of the "Python Essential Reference, 4th Ed."
- Breakfast and lunch at local restaurants
Practical Python Programming
[4.5 days] This course, designed for professional software developers,
scientists, and engineers, is a comprehensive introduction to the
Python programming language, standard library, and Python programming
techniques. Although the course assumes no prior experience with
Python, the course is strongly focused on using Python for various
data processing, scripting tasks, and systems administration
Major topics include:
- An introduction to python
- Working with data and collections
- Program organization and functions
- Modules and libraries
- Classes and objects
- Testing, debugging, and profiling
- Iterators and generators
- Text processing and parsing
- Files and the file system
- Accessing web services via Python
- Parsing common data formats (XML, JSON, CSV, etc.)
Detailed Course Outline
- Introduction to Python.
An introduction to the Python programming language. Covers details of
how to start and stop the interpreter and write programs. Introduces
Python's basic datatypes, files, functions, and error handling.
- Working with Data.
A detailed tour of how to represent and work with data in Python.
Covers tuples, lists, dictionaries, and sets. Students will also
learn how to effectively use Python's very powerful list processing
primitives such as list comprehensions. Finally, this section covers
critical aspects of Python's
underlying object model including variables, reference counting, copying,
and type checking.
- Program Organization and Functions.
More information about how to organize larger programs into functions. A major focus
of this section is on how to design functions that are reliable and can be easily
reused in other settings. Also covers technical details of functions including
scoping rules, documentation strings, and exception handling.
- Modules and Libraries. How to organize programs into
modules and details on using modules as a tool for creating extensible
programs. This section concludes with a overview of some of the most
commonly used library modules and instructions on how to install third
party library modules. Some of the standard library modules covered
in this section include those related to the file system and file
handling, subprocesses, regular expressions, XML, data serialization,
and database access.
- Classes and Objects. An introduction to object-oriented
programming in Python. Describes how to create new objects, overload
operators, and utilize Python special methods. Also covers some basic
principles of object oriented programming including inheritance.
- Inside the Python Object Model. A detailed look at how
objects are implemented in Python. Major topics include object
representation, attribute binding, inheritance, memory management, and
special properties of classes including properties, slots, and private
- Testing, Debugging, and Software Development Practice.
This section discusses many isses that are considered important to
Python software development. This includes effective use of
documentation strings, program testing using both the doctest and
unittest modules, and effective use of assertions. The Python
logging, debugging, and profiling modules are also described.
- Generators. Covers the iteration protocol, generators, and
generator expressions. A major focus of this section concerns the use
of generators to set up data processing pipelines--a particularly
effective technique for addressing a wide variety of common systems
programming problems (e.g., processing large datafiles, handling
infinite data streams, etc.).
- Some Advanced Topics. A variety of more advanced
programming topics including variable argument functions, anonymous
functions (lambda), closures, decorators, static and class methods,
Students will receive a bound 300-page fully indexed set of lecture notes along with a complete set of more than 50 class exercises (distributed
electronically). All class exercises come with solution code for later study and for use during the class.