--- ConfigParser.py.orig 2005年03月16日 18:23:19.000000000 +0300 +++ ConfigParser.py 2005年03月17日 17:16:53.000000000 +0300 @@ -24,11 +24,15 @@ methods: - __init__(defaults=None) + __init__(defaults=None, delimitier='=:') create the parser and specify a dictionary of intrinsic defaults. The keys must be strings, the values must be appropriate for %()s string interpolation. Note that `__name__' is always an intrinsic default; it's value is the section's name. + delimitier is string with all symbols which may be used as divisor + between key and value. Key may not contain delimitier symbol and no + escaping is possible. You may try to use space as delimitier. + When writing config file, first symbol from delimitier string is used. sections() return all the configuration section names, sans DEFAULT @@ -200,12 +204,28 @@ class RawConfigParser: - def __init__(self, defaults=None): + def __init__(self, defaults=None, delimitier='=:'): self._sections = {} if defaults is None: self._defaults = {} else: self._defaults = defaults + self.delim = delimitier + self.SECTCRE = re.compile( + r'\[' # [ + r'(?P [^]]+)' # very permissive! + r'\]' # ] + ) + self.OPTCRE = re.compile( + r'(?P