def handle_config_file(config_file):
    """Searches for the $temp wildcard in a given config file and replaces it."""
    parser = cp.ConfigParser()
    parser.read(config_file)
    sections = parser.sections()
    for section in sections:
        options = parser.options(section)
        for option in options:
            arg = parser.get(section, option, raw=True)
            if '$temp' in arg:
                LoggingManager._check_and_replace_parser_args(parser, section, option,
                                                              rename_func=_rename_filename,
                                                              make_dirs=False)
    return parser
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/testutils/ioutils.py/handle_config_file/original