diff --git a/jedi/__main__.py b/jedi/__main__.py index 73cde226..fc10ee03 100644 --- a/jedi/__main__.py +++ b/jedi/__main__.py @@ -1,2 +1,7 @@ -from os import path -print(path.join(path.dirname(path.abspath(__file__)), 'replstartup.py')) +from sys import argv + +if len(argv) == 2 and argv[1] == 'repl': + # don't want to use __main__ only for repl yet, maybe we want to use it for + # something else. So just use the keyword ``repl`` for now. + from os import path + print(path.join(path.dirname(path.abspath(__file__)), 'replstartup.py')) diff --git a/jedi/replstartup.py b/jedi/replstartup.py index 40ee77da..73b3f7fd 100644 --- a/jedi/replstartup.py +++ b/jedi/replstartup.py @@ -4,7 +4,7 @@ To use Jedi completion in Python interpreter, add the following in your shell setup (e.g., ``.bashrc``):: - export PYTHONSTARTUP="$(python -m jedi)" + export PYTHONSTARTUP="$(python -m jedi repl)" Then you will be able to use Jedi completer in your Python interpreter::