[Pythonmac-SIG] Multi-line history problems in ipython (mac osx)

Michael VanLandingham m.vanland at gmail.com
Tue Jan 15 01:01:55 CET 2008


Hi Group,
Perhaps this has been covered elsewhere, but I'm seeing problems in iPython
(0.8.2, 0.8.3 r2919) on OS X 10.5.1 when using the up arrow to do history
completion after multi-line input (a function def, for example).

Like this:

#define a silly function or any multi-line statement:

In [1]: def foo(s=None):
   ...:   if s:
   ...:     print 'foo got "%s"' % s
   ...:     return
   ...:   print "foo got nuthin'"
   ...:

#play with it:
In [2]: foo('bar')
foo got "bar"

In [3]: foo()
foo got nuthin'

#When I press the arrow-up key a couple times to edit the function def:

  if s: def foo(s=None):
                                                  print 'foo got "%s"' % s

                    return
                                                                print "foo
got nuthin'"


Notice how the 'def foo(s=None)' is on the same line as the 'if s:'?  And
once it does this, _all_ arrow-ups are out in the middle of the console and
well, generally messed up.

You can still use this if you're careful, but it's sketchy.

Is this a known issue?  Someone else recently mentioned to me that they were
seeing this as well.

Thanks,
Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/pythonmac-sig/attachments/20080114/5905895c/attachment.htm 


More information about the Pythonmac-SIG mailing list