Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-ID: <1905065.XAFRqVoOGU@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Fri, 20 May 2011 09:38:48 +0200 User-Agent: KNode/4.4.7 Content-Transfer-Encoding: 7Bit Subject: Re: connect SIGINT to custom interrupt handler Newsgroups: comp.lang.python References: <1691845.hkbZ0PkbqX@PointedEars.de> Followup-To: comp.lang.python MIME-Version: 1.0 Lines: 31 NNTP-Posting-Date: 20 May 2011 09:38:48 CEST NNTP-Posting-Host: a1d7c6d0.newsspool2.arcor-online.net X-Trace: DXC=YPR>7bYgh:;TQL:hoD@>T?A9EHlD;3Yc24Fo<]lROoR18kFd\^58DZm8W4\YJNYCaaO`4 X-Complaints-To: usenet-abuse@arcor.de Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:5837 Christoph Scheingraber wrote: > On 2011-05-15, Thomas 'PointedEars' Lahn wrote: >> Obviously. `signal' refers to an `int' object, probably by something >> like >> >> signal = 42 >> >> before. E.g. `print' or a debugger will tell you, as you have not showed >> the relevant parts of the code. > > The problem is that I am running someone else's module which seems to > use signal, I guess that means I have to create a child method? > Is it correct anyway to have > > signal.siginterrupt(signal.SIGINT, False) > > in my custom interrupt_handler function Only if `signal' is not the name of an int argument. > or should it be outside but > after signal.signal(signal.SIGINT, interrupt_handler)? In the meantime, Chris Angelico has pointed out the cause of the problem. Please follow his advice, i.e. rename your argument. -- PointedEars Bitte keine Kopien per E-Mail. / Please do not Cc: me.