Previous topic

Module APIs

Next topic

synfu.reactor.Reactor – Mailman signature and header filter

This Page

synfu.config.Config – Shared config storage and parser

Platforms: Unix, MacOS, Windows

Module author: René Köcher <shirk@bitspin.org>

class synfu.config.Config(path, options, *optargs)

SynFU global config

classmethod add_option(*args, **kwargs)

New in version 0.4.10.

Add a new option to the global set of parameters.

After a call to Config.get() the parsed options and arguments will be accessible as Config.option and Config.optargs.

Param :*args: positional arguments to passed to optparse.OptionParser.add_option()
Param :**keywords: keyword arguments to passed to optpars.OptionParser.add_option()
Returns:None
classmethod get(*args)

Return the shared Config instance (initalizing it as needed). For the config syntax in use see _synfu-config-syntax.

Parameters:*args (list of strings or None) – optional paths to search for synfu.conf
Return type:synfu.config.Config
Returns:an initialized synfu.config.Config instance