Documentation python3/library/signal: example does not work: SIGALARM unknow in signal
![](https://secure.gravatar.com/avatar/a3f9b8f00e0713a4c53ca648812cfb54.jpg?s=120&d=mm&r=g)
Hello, I've got this message: signal.signal(signal.SIGALARM, myHandler) AttributeError: module 'signal' has no attribute 'SIGALARM' I am using Manjaro/Python version 3.6.6. Gottfried
![](https://secure.gravatar.com/avatar/df8e51d7618d5ed7ccbbc8dea9a9afee.jpg?s=120&d=mm&r=g)
On Mon, Jul 30, 2018 at 12:51 PM, Gottfried Müller <gottfried.mueller@gmx.de> wrote:
Hello,
I've got this message:
signal.signal(signal.SIGALARM, myHandler) AttributeError: module 'signal' has no attribute 'SIGALARM'
Hi Gottfried, There is a typo in the snippet you've posted. If you replace 'signal.SIGALARM' with 'signal.SIGALRM' (no 'a' after 'l') it should work:
import signal def handler(signum, frame): pass ... signal.signal(signal.SIGALRM, handler) 0
--Berker
I am using Manjaro/Python version 3.6.6.
Gottfried
_______________________________________________ docs mailing list docs@python.org https://mail.python.org/mailman/listinfo/docs
participants (2)
-
Berker Peksağ
-
Gottfried Müller