Lines Matching refs:line
238 def parse_header(line):
244 parts = _parseparam(';' + line)
314 line
722 def __write(self, line):
723 """line is always bytes, not string"""
725 if self.__file.tell() + len(line) > 1000:
732 self.file.write(line)
735 self.file.write(line.decode(self.encoding, self.errors))
740 line = self.fp.readline(1<<16) # bytes
741 self.bytes_read += len(line)
742 if not line:
745 self.__write(line)
749 Data is read as bytes: boundaries and line ends must be converted
761 line = self.fp.readline(1<<16) # bytes
762 self.bytes_read += len(line)
763 _read += len(line)
764 if not line:
768 line = delim + line
770 if line.startswith(b"--") and last_line_lfend:
771 strippedline = line.rstrip()
778 if line.endswith(b"\r\n"):
780 line = line[:-2]
782 elif line.endswith(b"\n"):
784 line = line[:-1]
786 elif line.endswith(b"\r"):
790 line = line[:-1]
795 self.__write(odelim + line)
805 line = self.fp.readline(1<<16)
806 self.bytes_read += len(line)
807 if not line:
810 if line.endswith(b"--") and last_line_lfend:
811 strippedline = line.strip()
817 last_line_lfend = line.endswith(b'\n')