Qi Yong <qiy...@sosdg.org> 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 readline’ or not, the behaviour is unchanged. Can
you show a specific series of steps that changes the behaviour?

> Is it a python bug or a wrong exception usage? Thanks.

The ‘raw_input’ function uses the ‘readline’ library. That library uses
signal handlers for many of the terminal signals, as documented at
<URL:http://cnswww.cns.cwru.edu/php/chet/readline/readline.html#SEC43>.

-- 
 \       “You've got the brain of a four-year-old boy, and I'll bet he |
  `\                         was glad to get rid of it.” —Groucho Marx |
_o__)                                                                  |
Ben Finney

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to