dumper = yaml.Dumper(StringIO.StringIO()) dumper.close()