diff --git a/jedi/api/replstartup.py b/jedi/api/replstartup.py index 5bfcc8ce..b2dfdcfe 100644 --- a/jedi/api/replstartup.py +++ b/jedi/api/replstartup.py @@ -11,8 +11,8 @@ Then you will be able to use Jedi completer in your Python interpreter:: [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os - >>> os.path.join().split().in # doctest: +SKIP - os.path.join().split().index os.path.join().split().insert + >>> os.path.join('a', 'b').split().in # doctest: +SKIP + ...dex os.path.join().split().insert """ import jedi.utils diff --git a/jedi/utils.py b/jedi/utils.py index 12b36b76..3e924a73 100644 --- a/jedi/utils.py +++ b/jedi/utils.py @@ -108,6 +108,11 @@ def setup_readline(namespace_module=__main__): return None try: + # Need to import this one as well to make sure it's executed before + # this code. This didn't use to be an issue until 3.3. Starting with + # 3.4 this is different, it always overwrites the completer if it's not + # already imported here. + import rlcompleter import readline except ImportError: print("Jedi: Module readline not available.")