Changeset 571 for tea4cups

Show
Ignore:
Timestamp:
03/11/05 16:56:39 (20 years ago)
Author:
jerome
Message:

Added initial configuration file.

Location:
tea4cups/trunk
Files:
1 added
1 modified

Legend:

Unmodified
Added
Removed
  • tea4cups/trunk/cupsoftee

    r570 r571  
    8181                raise ConfigError, "Option %s not found in section global of %s" % (option, self.conffile) 
    8282                 
    83     def getPrinterOption(self, sectionname, option) :     
     83    def getSectionOption(self, sectionname, option) :     
    8484        """Returns an option from the printer section, or the global section, or raises a ConfigError.""" 
    8585        globaloption = self.getGlobalOption(option, ignore=1) 
     
    9191            else : 
    9292                raise ConfigError, "Option %s not found in section [%s] of %s" % (option, sectionname, self.conffile) 
     93                 
     94    def getSectionNames(self) :     
     95        """Returns the list of sections, i.e. all sections names minus 'global'.""" 
     96        return [pname for pname in self.config.sections() if pname != "global"] 
    9397         
    9498    def discoverOtherBackends(self) :