Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5693

Re: connect SIGINT to custom interrupt handler

From Christoph Scheingraber <spam@scheingraber.net>
Newsgroups comp.lang.python
Subject Re: connect SIGINT to custom interrupt handler
Date 2011-05-18 13:28 +0000
Organization (posted via) M-net Telekommunikations GmbH
Message-ID <slrnit7icb.f3l.spam@scheingraber.no-ip.org> (permalink)
References <slrnisv835.b74.chris@scheingraber.no-ip.org> <04cee22d-fc07-4c54-b91b-3f9e4730f095@glegroupsg2000goo.googlegroups.com>

Show all headers | View raw


On 2011-05-15, Miki Tebeka <miki.tebeka@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.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: connect SIGINT to custom interrupt handler Miki Tebeka <miki.tebeka@gmail.com> - 2011-05-15 08:25 -0700
  Re: connect SIGINT to custom interrupt handler Christoph Scheingraber <spam@scheingraber.net> - 2011-05-18 13:28 +0000
    Re: connect SIGINT to custom interrupt handler Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-05-18 07:16 -0700
      Re: connect SIGINT to custom interrupt handler Nobody <nobody@nowhere.com> - 2011-05-19 11:34 +0100

csiph-web