Generator Tricks for Systems Programmers - Version 2.0

Copyright (C) 2008
David M. Beazley
http://www.dabeaz.com

Presented at PyCon UK 2008, September 12, 2008.

Related Tutorials

Introduction

This tutorial discusses various techniques for using generator functions and generator expressions in the context of systems programming. This topic loosely includes files, file systems, text parsing, network programming, and programming with threads.

Support Data Files

The following file contains some supporting data files that are used by the various code samples. Download this to your machine to work the examples that follow.

This download also includes all of the code samples that follow below.

Code Samples

Here are various code samples that are used in the course. You can cut and paste these to your own machine to try them out. The order in which these are listed follow the course outline. These examples are written to run inside the "generators" directory that gets created when you unzip the above file containing the support data.

Part 2 : Processing Data Files

Part 3 : Fun with Files and Directories

Part 4 : Parsing and Processing Data

Part 5 : Processing Infinite Data

Part 6 : Feeding the Pipeline

Part 7 : Extending the pipeline

Part 8 : Advanced Data Routing

Part 9 : Various Programming Tricks (And Debugging)

Part 10 : Parsing and Printing

Part 11 : Co-routines


Copyright (C) 2005-2024, David Beazley