How do i : Python Threads + KeyboardInterrupt exception

Brendon Costa brendon at christian.net
Thu Jun 19 02:11:13 EDT 2008


I tested this a bit more. My windows example was incorrect. It should
have used CTRL_C_EVENT. But even then, the problem is that the process
will also close the console window from which it was called because of
the 0. Also this requires that the process actually have a console and
is not a GUI application.

Is there some other method rather than a blocking "for line in fin:"
that i can use for reading from a file like device that plays nicely
with other threads asynchronously waking it up?

Sorry for all the posts. I am giving updates as i look further into
the problem.



More information about the Python-list mailing list