Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!2a02:590:1:1::196.MISMATCH!news.teledata-fn.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Content-Type: text/plain; charset="ISO-8859-1" Message-Id: <1691845.hkbZ0PkbqX@PointedEars.de> From: Thomas 'PointedEars' Lahn Reply-To: Thomas 'PointedEars' Lahn Organization: PointedEars Software (PES) Date: Sun, 15 May 2011 17:43:40 +0200 User-Agent: KNode/4.4.7 Content-Transfer-Encoding: 7Bit Subject: Re: connect SIGINT to custom interrupt handler Newsgroups: comp.lang.python References: Followup-To: comp.lang.python MIME-Version: 1.0 Lines: 31 NNTP-Posting-Date: 15 May 2011 17:43:41 CEST NNTP-Posting-Host: 82ec36a7.newsspool1.arcor-online.net X-Trace: DXC=nc>?jl0]8fB^B]`=U:WelBic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBohhV8iXDLQDDZm8W4\YJNLT<8F<]0D<`IG64@XZfiG[D]gNb^m I now have signal.siginterrupt(signal.SIGINT, False) in the line > below signal.signal(signal.SIGINT, interrupt_handler) > > Unfortunately, pressing ^c still results in the same interrupt error. I > also tried putting signal.siginterrupt into the interrupt_handler > function, which gave an interesting result: > File "/usr/local/bin/obspysod", line 586, in interrupt_handler > signal.siginterrupt(signal.SIGINT, False) > AttributeError: 'int' object has no attribute 'siginterrupt' > > Could there be a namespace problem? 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. Please trim your quotes to the relevant minimum; DO NOT top-post. Also, it is not acceptable behavior to use domain namespaces without authorization (chris@spam.org is not a mailbox, yet spam.org is registered to someone else). -- PointedEars Bitte keine Kopien per E-Mail. / Please do not Cc: me.