]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Move the action of loading the configuration to the IdleConf module
authorGuido van Rossum <guido@python.org>
Sat, 12 May 2001 12:18:10 +0000 (12:18 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 12 May 2001 12:18:10 +0000 (12:18 +0000)
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.

Tools/idle/IdleConf.py
Tools/idle/idle.py

index 37f4ef1b0c75060188b598ed8096e910d4616807..8eaa8e06b58eef2045abc0eda63c305edb53d767 100644 (file)
@@ -110,3 +110,4 @@ def load(dir):
                    os.path.join(homedir, ".idle")))
 
 idleconf = IdleConfParser()
+load(os.path.dirname(__file__))
index f42327c9b39966b8eba3f6af225b7d73ec1d6855..8638a165b4b64808cf9da3ef8e5d175f95be3943 100755 (executable)
@@ -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()