self.__write(s)
def __write(self, s):
- """Write string s to the stream if a whole new block
- is ready to be written.
+ """Writes (and encodes) string s to the stream blockwise
+
+ will wait with encoding/writing until block is complete
"""
self.buf += s
while len(self.buf) > self.bufsize:
def __init__(self, name=None, mode="r", fileobj=None, format=None,
tarinfo=None, dereference=None, ignore_zeros=None, encoding=None,
errors="surrogateescape", pax_headers=None, debug=None,
- errorlevel=None, max_volume_size=None, new_volume_handler=None,
+ errorlevel=None, max_volume_size=None, new_volume_handler=None,
concat_compression=False, password='', save_to_members=True):
"""Open an (uncompressed) tar archive `name'. `mode' is either 'r' to
read from an existing archive, 'a' to append data to an existing
stream = _Stream(name, filemode, comptype, fileobj, bufsize,
concat_stream=True, enctype=enctype,
password=password, key_length=key_length,
- compresslevel=compresslevel)
+ compresslevel=compresslevel)
try:
t = cls(name, filemode, stream, **kwargs)
except: