Logo Search packages:      
Sourcecode: pythoncard version File versions  Download package

def textRouter::TextRouter::saveConfig (   self,
  configFile = "textRouter.conf" 
)

Saves a config file.

Definition at line 2612 of file textRouter.py.

02612                                                         :
        """Saves a config file."""
        try:
            cfile = open(configFile, "w")
        except IOError, e:
            self.status("Can't open file: %s" % e)
            return
        
        cfile.write("{\n")

        self.writePrefsSet(cfile, "generalPreferences", self.generalPrefs)

        self.writePrefsSet(cfile, "htmlPreferences", self.htmlPrefs)

        self.collectStateSettings()
        self.writePrefsSet(cfile, "stateSettings", self.stateSettings)

        self.writePrefsSet(cfile, "emailPreferences", self.emailPrefs)

        self.writePrefsSet(cfile, "emailRecipients", self.emailRcpts, 2)

        self.writePrefsSet(cfile, "filters", self.filters, 2)

        self.writePrefsSet(cfile, "manilaPreferences", self.manilaPrefs)

        self.writePrefsSet(cfile, "bloggerPreferences", self.bloggerPrefs)

        self.writePrefsSet(cfile, "utilitiesPreferences", self.utilitiesPrefs)

        theManilaAccountPrefs = [ site.prefs for site in self.theManilaAccounts ]
        self.writePrefsSet(cfile, "manilaAccounts", theManilaAccountPrefs, 2)

        theBloggerAccountPrefs = [ site.prefs for site in self.theBloggerAccounts ]
        self.writePrefsSet(cfile, "bloggerAccounts", theBloggerAccountPrefs)
        
        cfile.write("}\n")
        cfile.close()
        
        self.status("Config file saved.")

    def writePrefsSet(self, configFile, setName, prefs, type = 1):


Generated by  Doxygen 1.6.0   Back to index