WebKit.ConfigurableForServerSidePath | index /usr/local/share/webware/WebKit/ConfigurableForServerSidePath.py

Classes

``

MiscUtils.Configurable.Configurable
  ConfigurableForServerSidePath

class ConfigurableForServerSidePath(MiscUtils.Configurable.Configurable)

``

`This is a version of `MiscUtils.Configurable.Configurable`
that provides a customized `setting` method for classes which
have a `serverSidePath` method. If a setting's name ends with
``Filename`` or ``Dir``, its value is passed through
`serverSidePath` before being returned.
In other words, relative filenames and directory names are
expanded with the location of the object, NOT the current
directory.
Application and AppServer are two well known users of this
mix-in. Any class that has a `serverSidePath` method and a
`Configurable` base class, should inherit this class instead.
This is used with for MakeAppWorkDir, which changes the
serverSidePath.
`

Methods defined here:

setting(self, name, default=<class MiscUtils.NoDefault>)
  `Returns the setting, filtered by
  serverSidePath(), if the name ends with
  ``Filename`` or ``Dir``.`

Methods inherited from MiscUtils.Configurable.Configurable:

__init__(self)

commandLineConfig(self)
  `Settings that came from the command line (via
  addCommandLineSetting).`

config(self)
  `Returns the configuration of the object as a dictionary. This is a combination of defaultConfig() and userConfig(). This method caches the config.`

configFilename(self)
  `Returns the filename by which users can override the
  configuration. Subclasses must override to specify a
  name. Returning None is valid, in which case no user
  config file will be loaded.`

configName(self)
  `Returns the name of the configuration file (the portion
  before the '.config'). This is used on the command-line.`

configReplacementValues(self)
  `Returns a dictionary suitable for use with "string % dict"
  that should be used on the text in the config file. If an
  empty dictionary (or None) is returned then no substitution
  will be attempted.`

defaultConfig(self)
  `Returns a dictionary containing all the default values for the settings. This implementation returns {}. Subclasses should override.`

hasSetting(self, name)

printConfig(self, dest=None)
  `Prints the configuration to the given destination, which defaults to stdout. A fixed with font is assumed for aligning the values to start at the same column.`

setSetting(self, name, value)

userConfig(self)
  `Returns the user config overrides found in the optional config file, or {} if there is no such file. The config filename is taken from configFilename().`