Advanced Python Programming Syllabus
Day 1 (Optional)
Note: The primary focus of this section is not the creation of
web sites or the use of Python-based web application frameworks such
as Django, Turbogears, Pylons, etc.
- Network Fundamentals and Socket Programming.
An introduction to some basic concepts of network programming. Covers
the essential details of TCP/IP and programming with sockets. Students
will learn how to write both TCP and UDP based clients and servers.
- Client-side programming. A look at high-level library modules
that allow Python to connect to standard Internet and web-related services (e.g.,
HTTP, FTP, XML-RPC, etc.). Special attention
will be given to the urllib2 module that allows Python to interact
with web servers.
- Internet Data Handling.
A brief overview of library modules that are used to process common Internet data
formats such as HTML, XML, and JSON. Provides detailed coverage of the ElementTree
interface for parsing XML.
- Web Programming. The absolute basics of web programming in Python.
Topics include CGI scripting, the WSGI interface, and implementing custom HTTP servers.
Note: This section is primarily focused on how to put a web-based interface on low-level
services as might be encountered in a distributed computing environment. It does not
cover web frameworks or the problem of using Python to build a website.
- Advanced Networking.
Topics related to more advanced aspects of network programming. Covers modules for
writing custom TCP/UDP servers, concurrency, SSL, and an introduction to message passing.
Day 2
- Thread Programming. A comprehensive overview of concurrent programming with threads and
advanced Python programming idioms. This is a substantial course component that covers the following
core topics:
- The threading library
- Thread debugging
- Thread synchronization
- Proper use of synchronization primitives (locks, semaphores, events, condition variables, etc.)
- Threads and queues
- Common thread programming idioms
- Python interpreter execution model and the global interpreter lock (GIL)
- Using threads with C extension modules and the ctypes library.
In addition to the above topics, this section also includes material on the following
advanced Python programming topics:
- The logging module
- Decorators and Metaclasses
- Context managers
- Message Passing and Data Serialization. Covers the basics
of interprocess communication, message passing, and data serialization.
Covers many of Python's core library modules such as pickle and ctypes.
A major emphasis of this section is on efficiency and performance tuning.
For example, techniques for efficiently exchanging messages between
processes.
- Multiprocessing. Detailed coverage of
the new multiprocessing library added to Python 2.6. Covers process objects, pipes, queues, shared memory objects, and process pools.
Day 3
- Distributed Computing. How to write programs that utilize
multiple machines. Covers some core programming concpets such as
actors, client/server computing, REST, remote procedure call, and distributed objects. Includes coverage of XML-RPC and use of the multiprocessing
library to implement distributed objects.
- Advanced I/O handling. An examination of different I/O handling
models including blocking I/O, nonblocking I/O, polling, signal-driven I/O, and
asynchronous I/O.
- Generators and Coroutines. A look at how to use generators and coroutines to
implement a form of cooperative multitasking (sometimes referred to as tasklets, greenlets,
coroutines, etc.). Topics include using generator functions
to implement tasks and writing task schedulers for controlling such functions. Major parts
of this section will be related the use of generators to the I/O handling models described
in the previous two sections.
|