Ok, this makes me think it may be ipython bug after all.
I can't debug this properly now, but iplib.py has this snippet in raw_input:
if self.has_readline: # and some config option is set? try: histlen = self.readline.get_current_history_length() if histlen > 1: newhist = self.input_hist_raw[-1].rstrip() self.readline.remove_history_item(histlen-1) self.readline.replace_history_item(histlen-2, newhist.encode(self.stdin_encoding)) except AttributeError: pass # re{move,place}_history_item are new in 2.4.
Try disabling that code (if 0:). It's used to support multiline history editing, which may be buggy.
Ok, this makes me think it may be ipython bug after all.
I can't debug this properly now, but iplib.py has this snippet in raw_input:
if self.has_readline: # and some config option is set?
try:
histlen = self.readline. get_current_ history_ length( )
if histlen > 1:
newhist = self.input_ hist_raw[ -1].rstrip( )
self.readline. remove_ history_ item(histlen- 1)
self.readline. replace_ history_ item(histlen- 2,
newhist. encode( self.stdin_ encoding) )
except AttributeError:
pass # re{move, place}_ history_ item are new in 2.4.
Try disabling that code (if 0:). It's used to support multiline history editing, which may be buggy.