def start(self):
        """
        Send the stream header as described above.
        """
        attrs = {
            (None, "to"): str(self._to),
            (None, "version"): ".".join(map(str, self._version))
        }
        if self._from:
            attrs[None, "from"] = str(self._from)

        self._writer.startDocument()
        for prefix, uri in self._nsmap_to_use.items():
            self._writer.startPrefixMapping(prefix, uri)
        self._writer.startElementNS(
            (namespaces.xmlstream, "stream"),
            None,
            attrs)
        self._writer.flush()
def start ( self ) : attrs = { ( None , "to" ) : str ( self . _to ) , ( None , "version" ) : "." . join ( map ( str , self . _version ) ) } if self . _from : attrs [ None , "from" ] = str ( self . _from ) self . _writer . startDocument ( ) for prefix , uri in self . _nsmap_to_use . items ( ) : self . _writer . startPrefixMapping ( prefix , uri ) self . _writer . startElementNS ( ( namespaces . xmlstream , "stream" ) , None , attrs ) self . _writer . flush ( )
Send the stream header as described above.