def parse_formatstring(str_):
    fmtkey = '_output_format'
    argkey = '_output_format_args'
    strsplit = str_.split(':', 1)
    if len(strsplit) == 1:
        _format = strsplit[0]
        _format = _format if _format else None
        return OrderedDict_((
            (fmtkey, _format),
            (argkey, None),
        ))
    else:
        _format, argstr = strsplit
        _format = _format if _format else None
        opts = OrderedDict_()
        opts[fmtkey] = _format
        opts[argkey] = argstr if argstr else None
        _args = [x.strip() for x in argstr.split(',')]
        for arg in _args:
            if not arg:
                continue
            key, value = None, None
            if '=' in arg:
                key, value = [x.strip() for x in arg.split('=', 1)]
            else:
                if arg[0] == '-':
                    key, value = arg[1:], False
                elif arg[0] == '+':
                    key, value = arg[1:], True
                else:
                    key, value = arg, True
            if not isinstance(value, (bool, float, int)):
                opts[key] = str2boolintorfloat(value)
            else:
                opts[key] = value
    return opts
Flushes the channel database to its file.
dataset/ETHPy150Open westurner/pyline/pyline.py/parse_formatstring--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/src/ircdb.py/ChannelsDictionary.flush