Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!news2.euro.net!newsfeed.freenet.ag!news.space.net!news.m-online.net!not-for-mail From: Christoph Scheingraber Newsgroups: comp.lang.python Subject: Re: connect SIGINT to custom interrupt handler Date: Wed, 18 May 2011 13:28:41 +0000 (UTC) Organization: (posted via) M-net Telekommunikations GmbH Lines: 10 Message-ID: References: <04cee22d-fc07-4c54-b91b-3f9e4730f095@glegroupsg2000goo.googlegroups.com> Reply-To: usenet@scheingraber.net NNTP-Posting-Host: ppp-188-174-6-71.dynamic.mnet-online.de X-Trace: news.m-online.net 1305725321 31044 188.174.6.71 (18 May 2011 13:28:41 GMT) X-Complaints-To: abuse@m-online.net NNTP-Posting-Date: Wed, 18 May 2011 13:28:41 +0000 (UTC) User-Agent: slrn/pre1.0.0-18 (Linux) Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5693 On 2011-05-15, Miki Tebeka 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.