Re: [Python-Dev] KeyboardInterrupt not catch

2010-11-07 Thread Ralf Schmitt
Qi Yong writes: > Hello, > > With this script, after ctrl-d, ctrl-c exception not catch. > Is it a python bug or a wrong exception usage? Thanks. > If with import readline, this problem disappears. there's already a bug in the issue tracker: http://bugs.python.org/issue1195 Cheers, - Ralf _

Re: [Python-Dev] KeyboardInterrupt not catch

2010-11-07 Thread Ben Finney
Qi Yong writes: > With this script, after ctrl-d, ctrl-c exception not catch. When I run it, the Ctrl-D doesn't affect the behaviour of Ctrl-C. Can you confirm that the behaviour is dependent on whether Ctrl-D is used? > If with import readline, this problem disappears. Again, if I ‘import rea

[Python-Dev] KeyboardInterrupt not catch

2010-11-07 Thread Qi Yong
Hello, With this script, after ctrl-d, ctrl-c exception not catch. Is it a python bug or a wrong exception usage? Thanks. If with import readline, this problem disappears. -- qiyong def parse(): try: answer = raw_input("Eo: ") print answer except