Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cb7a21

Browse files
committed
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.
1 parent 8451ebb commit 6cb7a21

2 files changed

Lines changed: 1 addition & 8 deletions

File tree

Tools/idle/IdleConf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,4 @@ def load(dir):
110110
os.path.join(homedir, ".idle")))
111111

112112
idleconf = IdleConfParser()
113+
load(os.path.dirname(__file__))

Tools/idle/idle.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
#! /usr/bin/env python
22

3-
import os
4-
import sys
5-
import IdleConf
6-
7-
idle_dir = os.path.dirname(IdleConf.__file__)
8-
IdleConf.load(idle_dir)
9-
10-
# defer importing Pyshell until IdleConf is loaded
113
import PyShell
124
PyShell.main()

0 commit comments

Comments
 (0)