Lines Matching refs:line
23 This module does not do the line wrapping or end-of-line character
25 does dumb encoding and decoding. To deal with the various line
118 """Encode a single header line with quoted-printable (like) encoding.
133 with each line wrapped safely at, at most, maxlinelen characters (defaults
137 End-of-line characters (\\r, \\n, \\r\\n) will be automatically converted
138 to the canonical email line separator \\r\\n unless the keep_eols
141 Each line of the header will be terminated in the value of eol, which
152 # Quopri encode each line, in encoded chunks no greater than maxlinelen in
176 return joiner.join(['=?%s?q?%s?=' % (charset, line) for line in quoted])
184 If binary is False (the default), end-of-line characters will be converted
185 to the canonical email end-of-line sequence \\r\\n. Otherwise they will
188 Each line of encoded text will end with eol, which defaults to "\\n". Set
192 Each line will be wrapped at, at most, maxlinelen characters (defaults to
208 # Preserve line endings here so we can check later to see an eol needs to
211 for line in lines:
212 # But strip off line-endings for processing this line.
213 if line.endswith(CRLF):
214 line = line[:-2]
215 elif line[-1] in CRLF:
216 line = line[:-1]
221 linelen = len(line)
225 c = line[j]
230 # Check for whitespace at end of line; special case
235 # Check to see to see if the line has reached its maximum length
240 # Now at end of line..
249 # Just normal whitespace at end of line
253 # Now look at the line we just finished and it has a line ending, we
254 # need to add eol to the end of the line.
284 for line in encoded.splitlines():
285 line = line.rstrip()
286 if not line:
291 n = len(line)
293 c = line[i]
297 # Otherwise, c == "=". Are we at the end of the line? If so, add
298 # a soft line break.
303 elif i+2 < n and line[i+1] in hexdigits and line[i+2] in hexdigits:
304 decoded += unquote(line[i:i+3])