[Python-Dev] KeyboardInterrupt not catch (original) (raw)
Qi Yong qiyong at sosdg.org
Mon Nov 8 02:43:33 CET 2010
- Previous message: [Python-Dev] r86276 - python/branches/py3k/Lib/distutils/cygwinccompiler.py
- Next message: [Python-Dev] KeyboardInterrupt not catch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 EOFError: print("EOF") except KeyboardInterrupt: print("")
def main(): while True: parse()
if name == "main": main()
-- Qi Yong
- Previous message: [Python-Dev] r86276 - python/branches/py3k/Lib/distutils/cygwinccompiler.py
- Next message: [Python-Dev] KeyboardInterrupt not catch
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]