mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
rename the global IdleConfParser object from IdleConf to idleconf
standard usage is now from IdleConf import idleconf replace : with = in config.txt
This commit is contained in:
parent
ba23bed340
commit
6b3edf0510
5 changed files with 39 additions and 47 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue