From c615e70889e05f05ac8e363399449a6018d9d095 Mon Sep 17 00:00:00 2001 From: David Halter Date: Wed, 31 Jul 2013 17:30:53 +0200 Subject: [PATCH] only use repl keyword for now in __main__.py. --- jedi/__main__.py | 9 +++++++-- jedi/replstartup.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) 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::