[Python-checkins] python/dist/src/Doc/lib emailmessage.tex,1.10,1.11
bwarsaw@users.sourceforge.net
bwarsaw@users.sourceforge.net
Fri, 18 Apr 2003 16:03:57 -0700
- Previous message: [Python-checkins] python/dist/src/Doc/lib liblocale.tex,1.31,1.32 xmldom.tex,1.22,1.23 xmldomminidom.tex,1.7,1.8 xmlsax.tex,1.6,1.7 xmlsaxhandler.tex,1.9,1.10 xmlsaxreader.tex,1.4,1.5 xmlsaxutils.tex,1.4,1.5
- Next message: [Python-checkins] python/dist/src/Lib/email Message.py,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv18057
Modified Files:
emailmessage.tex
Log Message:
Added some more documentation to as_string() to make it clear that
it's a convenience only. Give an example of what to do for more
flexibility.
Index: emailmessage.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/emailmessage.tex,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** emailmessage.tex 10 Mar 2003 16:13:50 -0000 1.10
--- emailmessage.tex 18 Apr 2003 23:03:53 -0000 1.11
***************
*** 37,40 ****
--- 37,54 ----
\var{unixfrom} is \code{True}, the envelope header is included in the
returned string. \var{unixfrom} defaults to \code{False}.
+
+ Note that this method is provided as a convenience and may not always
+ format the message the way you want. For more flexibility,
+ instantiate a \class{Generator} instance and use its
+ \method{flatten()} method directly. For example:
+
+ \begin{verbatim}
+ from cStringIO import StringIO
+ from email.Generator import Generator
+ fp = StringIO()
+ g = Generator(mangle_from_=False, maxheaderlen=60)
+ g.flatten(msg)
+ text = fp.getvalue()
+ \end{verbatim}
\end{methoddesc}
- Previous message: [Python-checkins] python/dist/src/Doc/lib liblocale.tex,1.31,1.32 xmldom.tex,1.22,1.23 xmldomminidom.tex,1.7,1.8 xmlsax.tex,1.6,1.7 xmlsaxhandler.tex,1.9,1.10 xmlsaxreader.tex,1.4,1.5 xmlsaxutils.tex,1.4,1.5
- Next message: [Python-checkins] python/dist/src/Lib/email Message.py,1.30,1.31
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]