MCPcopy Index your code
hub / github.com/python/cpython / setByteStream

Method setByteStream

Lib/xml/sax/xmlreader.py:240–251  ·  view source on GitHub ↗

Set the byte stream (a Python file-like object which does not perform byte-to-character conversion) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a

(self, bytefile)

Source from the content-addressed store, hash-verified

238 return self.__encoding
239
240 def setByteStream(self, bytefile):
241 """Set the byte stream (a Python file-like object which does
242 not perform byte-to-character conversion) for this input
243 source.
244
245 The SAX parser will ignore this if there is also a character
246 stream specified, but it will use a byte stream in preference
247 to opening a URI connection itself.
248
249 If the application knows the character encoding of the byte
250 stream, it should set it with the setEncoding method."""
251 self.__bytefile = bytefile
252
253 def getByteStream(self):
254 """Get the byte stream for this input source.

Callers 7

test_byte_streamMethod · 0.95
resolveEntityMethod · 0.95
parseStringFunction · 0.95
prepare_input_sourceFunction · 0.95

Calls

no outgoing calls

Tested by 5

test_byte_streamMethod · 0.76
resolveEntityMethod · 0.76