New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import tab-complete fail with ipython 2.0 shell #5514
Comments
I am also seeing this. I'm using OSX and Python 2.7 provided by brew. Works fine with IPython 1.2.1 and earlier. |
A user reported the same bug under Mageia with Python2.7 and Python3.3 |
So far I'm unable to replicate this (Debian, Python 3.3 and 2.7), and unsure what could be causing it - I don't think that code has had any major changes since 1.x. |
@GhislainHivon @drkjam do you have PYTHONSTARTUP set? |
Ok, some more info here. I have PYTHONSTARTUP variable defined. echo $PYTHONSTARTUP readline.parse_and_bind("tab: complete") If I now unset PYTHONSTARTUP $ unset PYTHONSTARTUP and launch IPython, import completions now work. So it does have something to do with PYTHONSTARTUP variable or what the startup script is doing. |
IPython now runs PYTHONSTARTUP, and is less aggressive about using its own completer. So when you configure a more basic completer in PYTHONSTARTUP, IPython ends up using that instead of its own completer. |
Ok, that explains it. I'm not sure if this is not working for the same reason for other people experiencing this problem. |
Same thing, PYTHONSTARTUP with readline.parse_and_bind("tab: complete") in it. I found a easy way to test if in ipython
|
The name |
should avoid conflicts between IPython and Python completion setup Many folks have completion setup in PYTHONSTARTUP for the plain Python REPL. In IPython 1.x, this wasn't an issue because IPython reset the readline state after every execution. This was removed in 2.0 (#4353), allowing users to customize readline behavior. One effect of this is allowing PYTHONSTARTUP to customize *IPython's* readline behavior, which seems to be something nobody wants. This PR simply re-applies the old reset readline behavior after running PYTHONSTARTUP. closes #5514
In the shell, when trying to tab-complete a module name for import, the propose completion is not modules names.
with ipython 2.0
That the same list as when tab-complete without anything
instead of what ipython 1.1 give
I'm on fedora 17, with python 2.7 in a virtualenv
The text was updated successfully, but these errors were encountered: