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.

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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

  1. 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

  2. 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.

  3. 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

  1. 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.

  2. 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.

  3. 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.


Copyright (C) 2005-2026, David Beazley