diff options
author | Terry Jan Reedy <tjreedy@udel.edu> | 2016-09-30 02:57:01 -0400 |
---|---|---|
committer | Terry Jan Reedy <tjreedy@udel.edu> | 2016-09-30 02:57:01 -0400 |
commit | 41a580045631c9b5f325d2c57a2a1c1926653051 (patch) | |
tree | f3711566f84807ff94341bacf94136ed4894baaf /Lib/idlelib/idle.py | |
parent | ca3c5f580dfac09b7954199dd8a9ddd00507fad4 (diff) | |
parent | b63c4fc18bb144037d2d3317612d340860788ed6 (diff) | |
download | cpython-git-41a580045631c9b5f325d2c57a2a1c1926653051.tar.gz |
Merge with 3.6
Diffstat (limited to 'Lib/idlelib/idle.py')
-rw-r--r-- | Lib/idlelib/idle.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/idlelib/idle.py b/Lib/idlelib/idle.py index c01cf992cc..485d5a75a2 100644 --- a/Lib/idlelib/idle.py +++ b/Lib/idlelib/idle.py @@ -1,11 +1,14 @@ import os.path import sys -# If we are working on a development version of IDLE, we need to prepend the -# parent of this idlelib dir to sys.path. Otherwise, importing idlelib gets -# the version installed with the Python used to call this module: + +# Enable running IDLE with idlelib in a non-standard location. +# This was once used to run development versions of IDLE. +# Because PEP 434 declared idle.py a public interface, +# removal should require deprecation. idlelib_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -sys.path.insert(0, idlelib_dir) +if idlelib_dir not in sys.path: + sys.path.insert(0, idlelib_dir) -import idlelib.pyshell -idlelib.pyshell.main() +from idlelib.pyshell import main # This is subject to change +main() |