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

Method write

Lib/tarfile.py:441–449  ·  view source on GitHub ↗

Write string s to the stream.

(self, s)

Source from the content-addressed store, hash-verified

439 self.__write(self.name.encode("iso-8859-1", "replace") + NUL)
440
441 def write(self, s):
442 """Write string s to the stream.
443 """
444 if self.comptype == "gz":
445 self.crc = self.zlib.crc32(s, self.crc)
446 self.pos += len(s)
447 if self.comptype != "tar":
448 s = self.cmp.compress(s)
449 self.__write(s)
450
451 def __write(self, s):
452 """Write string s to the stream if a whole new block

Callers 7

copyfileobjFunction · 0.45
writeMethod · 0.45
__writeMethod · 0.45
closeMethod · 0.45
__init__Method · 0.45
closeMethod · 0.45
addfileMethod · 0.45

Calls 2

__writeMethod · 0.95
compressMethod · 0.45

Tested by

no test coverage detected