March 2003
Intermediate to advanced
656 pages
39h 30m
English
Generator
class Generator(outfp,mangle_from_=False,maxheaderlen=78)
outfp is a file or file-like object
supplying method write. When
mangle_from_ is true,
g prepends a '>' to
any line in a message’s payload that starts with
'From ' This helps make the
message’s textual form more safely parseable.
g wraps each header line at semicolons,
into physical lines of no more than
maxheaderlen characters, for readability.
To use g, just call it:
g(m,unixfrom=False)
This emits m in text form to
outfp, like
outfp
.write(
m
.as_string(
unixfrom
)).