diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-30 07:38:54 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-09-30 07:38:54 (GMT) |
| commit | 8cb6091394c2013903dd6fa45057c5dfd5b38fd2 (patch) | |
| tree | 77013fa4982808b40a184f7e1a0ae30ecdafde28 /Lib/idlelib/idle.py | |
| parent | 3738c2d8ae44347835b655a22bb4a3c4340af147 (diff) | |
| parent | b63c4fc18bb144037d2d3317612d340860788ed6 (diff) | |
| download | cpython-8cb6091394c2013903dd6fa45057c5dfd5b38fd2.zip cpython-8cb6091394c2013903dd6fa45057c5dfd5b38fd2.tar.gz cpython-8cb6091394c2013903dd6fa45057c5dfd5b38fd2.tar.bz2 | |
Merge heads
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 c01cf99..485d5a7 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() |
