dumper = yaml.Dumper(io.StringIO()) dumper.open() dumper.open()