views:

145

answers:

1

I am running IPython on Windows 7 x64 with pyreadline installed. If I start a new session and type:

import numpy
nu<TAB>

Then nu autocompletes to numpy. However, if I start a new session and try this:

import numpy
n<TAB>

Then nothing happens. I would expect it to cycle through all of the possible completions. I'm currently using out of the box config, do I need to change a setting to enable ambiguous tab completion or am I just out of luck?

EDIT: To address the comment from ma3204, here is another example (start with fresh ipython session):

[In 1]: value1 = 5

[In 2]: value2 = 6

[In 3]: va<TAB>       ... nothing happens
[In 3]: va<Ctrl + l>
vars   value2 value1

[In 3]: val<TAB>      ... completes to 'value'
[In 3]: value
[In 3]: value<Ctrl + l>
value2 value1

[In 3]: value

When I type va<TAB> above I would expect each tab press to cycle through value1, value2, vars, value1, value2, etc.

+5  A: 

Just installed python 2.6 and numpy, ipython and so on. I am also annoyed of this. On my other computers with older installations it works. I use the completions list very much to see what commands are available so I feel frustrated when it doesn't work.

EDIT: Found that you can get it with CTRL-l. Looked in ipythonrc and it should work like I am used to but not. The CTRL-l work though. Will see if it kicks back on. Seem to remember that I had similar trouble before but it worked after some time.

Slasher
+1 That's better than nothing. Thanks for the tip. For others who find this page, please note that the shortcut key is `Ctrl + <lowercase L>` not `Ctrl + <uppercase I>`. It took me a few minutes to realize that.
mwolfe02
Works for me ! Thank you both.
davidnr
I'm marking this as the answer for now, since it seems ipython does not currently support this feature in this environment. If someone knows differently, please add it as an answer and I'll update my marked answer as appropriate.
mwolfe02
I'm not sure what I did differently, but I never experienced this issue with the same OS, software, etc. Tab completion worked as expected for me.
ma3
Oh my, thanks so much! This was driving me nuts having just switched to Windows for my main dev environment I really missed my iPython completion lists!
gbc