diff options
| author | Steven M. Gava <elguavas@python.net> | 2002-03-02 07:16:21 (GMT) | 
|---|---|---|
| committer | Steven M. Gava <elguavas@python.net> | 2002-03-02 07:16:21 (GMT) | 
| commit | b77d343bc846c2049a4cffb1dfd65eb49d1728b4 (patch) | |
| tree | a51c275c42fbca32c9bf3d43d4dfe8c66c3abe86 /Lib/idlelib/configHandler.py | |
| parent | 03b18834c33dff7b231a22e5da28c8a9f250d1d3 (diff) | |
| download | cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.zip cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.tar.gz cpython-b77d343bc846c2049a4cffb1dfd65eb49d1728b4.tar.bz2  | |
First work on making config changes dynamic,
dynamic theme changes
Diffstat (limited to 'Lib/idlelib/configHandler.py')
| -rw-r--r-- | Lib/idlelib/configHandler.py | 10 | 
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py index 9db7120..82bf6d2 100644 --- a/Lib/idlelib/configHandler.py +++ b/Lib/idlelib/configHandler.py @@ -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:      """  | 
