New submission from Anand Patil:
Mac OS 10.4, Python 2.5 from pythonmac.org: The function listen() in the
attached should be interrupted after a second, but it waits until return
is pressed before catching the exception.
----------
components: Macintosh
files: test.py
messages: 55673
nosy: anand
severity: normal
status: open
title: interrupt_main() fails to interrupt raw_input()
type: behavior
versions: Python 2.5
__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1113>
__________________________________
from thread import *
from threading import *
from time import *
def interrupt():
sleep(1)
print 'Interrupting main thread now'
interrupt_main()
def listen():
t = Thread(target=interrupt)
t.start()
try:
b = raw_input()
except KeyboardInterrupt:
print 'Exception caught'
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com