[IPython-user] Re: [Fwd: History event recall & file name completion]

Andrew Malcolmson andzy at imap-mail.com
Thu Dec 18 23:06:02 CST 2003


On Wed, 17 Dec 2003 09:18:47 -0700, Fernando Perez wrote:

> 
> 1. Can I recall an history event by line number in IPython like you can in
> the shell with !<line #> ?  If there's a choice, I'd prefer a recall that
> works like zsh's HIST_VERIFY option which lets you edit the line before
> executing it.
> 
> 
> 1. All the history is held in by line number in the In[] array, so you can
> type:
> 
> In [1]: print 'hi'
> hi
> 
> In [2]: exec In[1]
> hi
> 
> But there's no editing other than by normal python means:
> 
> In [3]: exec In[1].replace('hi','hello') hello

Good enough.

> 
> 2. I'm not getting file or directory completion.  I know this should work
> but pressing the TAB key doesn't return any completions. Changing the
> command from 'ls' to '@ls' to '!ls' doesn't make any difference.
> 
> 2. You are probably using python 2.3.  Python changed its readline
> behavior at the C level in 2.3 and they broke filename and directory
> completion.   Thanks to Jeff Collins, ipython's current cvs code already
> implements a workaround, but this hasn't been released yet (it's available
> to you if you want to use the CVS code).  

Yay! works.

Thanks







More information about the IPython-user mailing list