connect SIGINT to custom interrupt handler

Christoph Scheingraber spam at scheingraber.net
Wed May 18 09:28:41 EDT 2011


On 2011-05-15, Miki Tebeka <miki.tebeka at gmail.com> wrote:
> Why not just catch KeyboardInterrupt?

Would it be possible to continue my program as nothing had happened in
that case (like I did before, setting a flag to tell main() to finish the
running data download and quit instead of starting the next data download
{it's a for-loop})?

I have tried it, but after catching the KeyboardInterrupt I could only
continue to the next iteration.



More information about the Python-list mailing list