On Thu, Nov 24, 2011 at 5:07 PM, Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: >> This looks like the classic "sigint handler sets a flag that the main >> loop polls" structure. > > Exactly. I am open to alternative methods if they are lightweight.
Might be easiest to spin off a thread to do the work, and then have the main thread block on the keyboard. ChrisA -- http://mail.python.org/mailman/listinfo/python-list