From: Terry Jan Reedy Date: Fri, 30 Sep 2016 06:56:46 +0000 (-0400) Subject: Issue #25488: merge idle.py from 3.5. X-Git-Tag: v3.6.0b2~87^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b63c4fc18bb144037d2d3317612d340860788ed6;p=thirdparty%2FPython%2Fcpython.git Issue #25488: merge idle.py from 3.5. --- b63c4fc18bb144037d2d3317612d340860788ed6 diff --cc Lib/idlelib/idle.py index c01cf992cc15,141534dfe135..485d5a75a29c --- a/Lib/idlelib/idle.py +++ b/Lib/idlelib/idle.py @@@ -1,11 -1,13 +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 ++from idlelib.pyshell import main # This is subject to change + main()