'Helper to create temp config files.'

def create_config_file(self, config):

    if (not isinstance(config, markdown.util.string_type)):
        config = yaml.dump(config)
    (fd, self.tempfile) = tempfile.mkstemp(u'.yml')
    with os.fdopen(fd, u'w') as fp:
        fp.write(config)
