def emit(events, stream=None, Dumper=Dumper, canonical=None, indent=None, width=None, allow_unicode=None, line_break=None):
 getvalue = None
 if (stream is None):
  from StringIO import StringIO
  stream = StringIO()
  getvalue = stream.getvalue
 dumper = Dumper(stream, canonical=canonical, indent=indent, width=width, allow_unicode=allow_unicode, line_break=line_break)
 for event in events:
  dumper.emit(event)
 if getvalue:
  return getvalue()

def emit ( events , stream = None , Dumper = Dumper , canonical = None , indent = None , width = None , allow_unicode = None , line_break = None ) : getvalue = None if ( stream is None ) : from StringIO import StringIO stream = StringIO ( ) getvalue = stream . getvalue dumper = Dumper ( stream , canonical = canonical , indent = indent , width = width , allow_unicode = allow_unicode , line_break = line_break ) for event in events : dumper . emit ( event ) if getvalue : return getvalue ( )
emit yaml parsing events into a stream .