diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-07 17:55:32 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-03-07 17:55:32 (GMT) |
commit | 6b3edf051009ec94f65efb2817f6344cf0531480 (patch) | |
tree | 175ee338703bda6e3abdacc0c55c7e047ff3bfdb /Tools/idle/IdleConf.py | |
parent | ba23bed340bab31b8c233f27acb181516f9de60c (diff) | |
download | cpython-6b3edf051009ec94f65efb2817f6344cf0531480.zip cpython-6b3edf051009ec94f65efb2817f6344cf0531480.tar.gz cpython-6b3edf051009ec94f65efb2817f6344cf0531480.tar.bz2 |
rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf
replace : with = in config.txt
Diffstat (limited to 'Tools/idle/IdleConf.py')
-rw-r--r-- | Tools/idle/IdleConf.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/Tools/idle/IdleConf.py b/Tools/idle/IdleConf.py index 807f183..36cad51 100644 --- a/Tools/idle/IdleConf.py +++ b/Tools/idle/IdleConf.py @@ -44,8 +44,8 @@ class IdleConfParser(ConfigParser): return exts def reload(self): - global IdleConf - IdleConf = IdleConfParser() + global idleconf + idleconf = IdleConfParser() load(_dir) # _dir is a global holding the last directory loaded class SectionConfigParser: @@ -105,17 +105,9 @@ def load(dir): homedir = os.environ['HOME'] except KeyError: homedir = os.getcwd() - - for file in (os.path.join(dir, "config.txt"), - genplatfile, - platfile, - os.path.join(homedir, ".idle"), - ): - try: - f = open(file) - except IOError: - continue - IdleConf.readfp(f) - f.close() - -IdleConf = IdleConfParser() + + idleconf.read((os.path.join(dir, "config.txt"), genplatfile, platfile, + os.path.join(homedir, ".idle"))) + +idleconf = IdleConfParser() + |