This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sa
Recipients bruce_edge, loewis, mwh, sa
Date 2009-09-26.11:48:33
SpamBayes Score 9.442843e-09
Marked as misclassified No
Message-id <1253965715.43.0.531220138307.issue1175004@psf.upfronthosting.co.za>
In-reply-to
Content
Access to rl_reset_line_state (and possibly others in the Redisplay
section) are also required, otherwise it's not possible to recover from
KeyboardInterrupt during raw_input() if readline isn't in the expected
editing mode.

Example:
  1. call raw_input() and use ctrl-R (reverse-i-search)
  2. catch a KeyboardInterrupt
  3. call raw_input() again

The input editing is still in reverse-i-search mode.
This makes it impractical to use raw_input() again after
KeyboardInterrupt because the input buffer may be in an unknown state.
If the history is modified then the search will break and character
input will appear to be ignored.

Note: It may be desirable to stay in this mode and call raw_input()
again, ignoring KeyboardInterrupt entirely (although the prompt is
redisplayed when exiting search mode so that doesn't currently work
cleanly), so it can't just auto-reset on KeyboardInterrupt.

The documentation should explain how to resume after KeyboardInterrupt
safely.
History
Date User Action Args
2009-09-26 11:48:35sasetrecipients: + sa, mwh, loewis, bruce_edge
2009-09-26 11:48:35sasetmessageid: <1253965715.43.0.531220138307.issue1175004@psf.upfronthosting.co.za>
2009-09-26 11:48:34salinkissue1175004 messages
2009-09-26 11:48:33sacreate