From: Guido van Rossum Date: Sat, 12 May 2001 12:18:10 +0000 (+0000) Subject: Move the action of loading the configuration to the IdleConf module X-Git-Tag: v2.2a3~1799 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6cb7a21934d2579152b9dedc8b4c87e7c8b3faaa;p=thirdparty%2FPython%2Fcpython.git Move the action of loading the configuration to the IdleConf module rather than the idle.py script. This has advantages and disadvantages; the biggest advantage being that we can more easily have an alternative main program. --- diff --git a/Tools/idle/IdleConf.py b/Tools/idle/IdleConf.py index 37f4ef1b0c75..8eaa8e06b58e 100644 --- a/Tools/idle/IdleConf.py +++ b/Tools/idle/IdleConf.py @@ -110,3 +110,4 @@ def load(dir): os.path.join(homedir, ".idle"))) idleconf = IdleConfParser() +load(os.path.dirname(__file__)) diff --git a/Tools/idle/idle.py b/Tools/idle/idle.py index f42327c9b399..8638a165b4b6 100755 --- a/Tools/idle/idle.py +++ b/Tools/idle/idle.py @@ -1,12 +1,4 @@ #! /usr/bin/env python -import os -import sys -import IdleConf - -idle_dir = os.path.dirname(IdleConf.__file__) -IdleConf.load(idle_dir) - -# defer importing Pyshell until IdleConf is loaded import PyShell PyShell.main()