Forwarding as a re-send because the cut and paste missed 'i' at the beginning of 'ipython'.<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Michael VanLandingham
</b> <<a href="mailto:m.vanland@gmail.com">m.vanland@gmail.com</a>><br>Date: Jan 14, 2008 4:01 PM<br>Subject: Multi-line history problems in ipython (mac osx)<br>To: <a href="mailto:pythonmac-sig@python.org">pythonmac-sig@python.org
</a>, <a href="mailto:python-dev@scipy.org">python-dev@scipy.org</a><br><br><br><span>Hi Group,<div><br></div><div>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).</div><div><br></div><div>Like this:</div><div><br>
</div><div>#define a silly function or any multi-line statement:</div><div><div><font face="Monaco" size="3"><span style="font-size:11px"><br>
</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">In [1]: def foo(s=None):</span></font></div><div><font face="Monaco" size="3">
<span style="font-size:11px">   ...:   if s:</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">   ...:     print 'foo got "%s"' % s
</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">   ...:     return</span></font></div><div><font face="Monaco" size="3">
<span style="font-size:11px">   ...:   print "foo got nuthin'"</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">
   ...: </span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px"><br></span></font></div><div><font face="Monaco" size="3">
<span style="font-size:11px">#play with it:</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">In [2]: foo('bar')
</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">foo got "bar"</span></font></div><div><font face="Monaco" size="3">
<span style="font-size:11px"><br></span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">
In [3]: foo()</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">foo got nuthin'</span></font></div><div><font face="Monaco" size="3">
<span style="font-size:11px"><br></span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px">
#When I press the arrow-up key a couple times to edit the function def:</span></font></div><div><font face="Monaco" size="3"><span style="font-size:11px"><br>
</span></font></div><div><span style="font-family:Monaco;font-size:11px">  if s: def foo(s=None):                                                                                                       print 'foo got "%s"' % s                                                                                                   return                                                                                                                   print "foo got nuthin'"
</span></div><div><br></div></div><div> </div><div>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.
</div><div><br></div><div>You can still use this if you're careful, but it's sketchy.</div><div><br></div><div>Is this a known issue?  Someone else recently mentioned to me that they were seeing this as well.  
</div><div><br></div><div>Thanks,</div><div>Michael</div></span>
</div><br>