Message93159
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. |
|
Date |
User |
Action |
Args |
2009-09-26 11:48:35 | sa | set | recipients:
+ sa, mwh, loewis, bruce_edge |
2009-09-26 11:48:35 | sa | set | messageid: <1253965715.43.0.531220138307.issue1175004@psf.upfronthosting.co.za> |
2009-09-26 11:48:34 | sa | link | issue1175004 messages |
2009-09-26 11:48:33 | sa | create | |
|