mirror of
https://github.com/python/cpython.git
synced 2025-08-28 20:56:54 +00:00
First work on making config changes dynamic,
dynamic theme changes
This commit is contained in:
parent
03b18834c3
commit
b77d343bc8
5 changed files with 56 additions and 36 deletions
|
@ -110,6 +110,13 @@ class IdleUserConfParser(IdleConfParser):
|
|||
self.set(section,option,value)
|
||||
return 1
|
||||
|
||||
def RemoveFile(self):
|
||||
"""
|
||||
Removes the user config file from disk if it exists.
|
||||
"""
|
||||
if os.path.exists(self.file):
|
||||
os.remove(self.file)
|
||||
|
||||
def Save(self):
|
||||
"""
|
||||
If config isn't empty, write file to disk. If config is empty,
|
||||
|
@ -119,8 +126,7 @@ class IdleUserConfParser(IdleConfParser):
|
|||
cfgFile=open(self.file,'w')
|
||||
self.write(cfgFile)
|
||||
else:
|
||||
if os.path.exists(self.file):
|
||||
os.remove(self.file)
|
||||
self.RemoveFile()
|
||||
|
||||
class IdleConf:
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue