def yaml_dquote(text):
 with io.StringIO() as ostream:
  yemitter = yaml.emitter.Emitter(ostream, width=six.MAXSIZE)
  yemitter.write_double_quoted(six.text_type(text))
  return ostream.getvalue()

def yaml_dquote ( text ) : with io . StringIO ( ) as ostream : yemitter = yaml . emitter . Emitter ( ostream , width = six . MAXSIZE ) yemitter . write_double_quoted ( six . text_type ( text ) ) return ostream . getvalue ( )
make text into a double-quoted yaml string with correct escaping for special characters .