def regurgitate(depth, use_pyyaml_formatter=False): data = yaml.safe_load(sys.stdin) if use_pyyaml_formatter: output = yaml.dump(data, sort_keys=True) sys.stdout.write(output) else: miniyaml.render(sys.stdout, data, depth)
def write(self, output_filehandle): miniyaml.render(output_filehandle, self.function(), self.depth)
def write(self, output_filehandle): build_dict = OrderedDict() self.function(build_dict) miniyaml.render(output_filehandle, build_dict, self.depth)