from warnings import warn
import os.path
from .iter_helpers import zip_longest
-
from .type_helpers import is_str_or_byte, is_file_obj
_create_description_unknown_counter = 0
+
def create_description(file_obj, file_desc):
""" create some description for given file-like object / file descriptor
'stop watching it!'
.format(file_desc, description),
category=LogReadWarning)
- self.do_ignore[idx] = True
+ self.ignore[idx] = True
elif new_size < last_size:
warn('{0} / {1} has become smaller ({2} --> {3})!'
.format(obj, description, last_size, new_size),
LINE_SPLITTERS = '\n\r'
+
class LineReader(IterativeReader):
""" an IterativeReader that returns new data line-wise
returns lines without their newline characters
"""
-
- #print('splitting "{0}" + "{1}"'.format(self.line_buffers[idx],
- # new_data.replace('\n', r'\n')))
all_data = self.line_buffers[idx] + new_data
self.line_buffers[idx] = ''
result = []