diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2006-04-23 21:51:10 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2006-04-23 21:51:10 (GMT) |
commit | d4c2177b780d3d4e23ed1d541d52b3a896b8c5c8 (patch) | |
tree | 84a5f3a5797836436096530329f901fed41c3eef /Doc/whatsnew | |
parent | edb575e758f7ca6cd0390e6ef5444e78971e7cd4 (diff) | |
download | cpython-d4c2177b780d3d4e23ed1d541d52b3a896b8c5c8.zip cpython-d4c2177b780d3d4e23ed1d541d52b3a896b8c5c8.tar.gz cpython-d4c2177b780d3d4e23ed1d541d52b3a896b8c5c8.tar.bz2 |
Add two items
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r-- | Doc/whatsnew/whatsnew25.tex | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Doc/whatsnew/whatsnew25.tex b/Doc/whatsnew/whatsnew25.tex index b55e425..98195d5 100644 --- a/Doc/whatsnew/whatsnew25.tex +++ b/Doc/whatsnew/whatsnew25.tex @@ -1340,6 +1340,30 @@ itertools.islice(iterable, s.start, s.stop, s.step) (Contributed by Raymond Hettinger.) +\item The \module{mailbox} module underwent a massive rewrite to add +the capability to modify mailboxes in addition to reading them. A new +set of classes that include \class{mbox}, \class{MH}, and +\class{Maildir} are used to read mailboxes, and have an +\method{add(\var{message})} method to add messages, +\method{remove(\var{key})} to remove messages, and +\method{lock()}/\method{unlock()} to lock/unlock the mailbox. The +following example converts a maildir-format mailbox into an mbox-format one: + +\begin{verbatim} +import mailbox + +# 'factory=None' uses email.Message.Message as the class representing +# individual messages. +src = mailbox.Maildir('maildir', factory=None) +dest = mailbox.mbox('/tmp/mbox') + +for msg in src: + dest.add(msg) +\end{verbatim} + +(Contributed by Gregory K. Johnson. Funding was provided by Google's +2005 Summer of Code.) + \item The \module{nis} module now supports accessing domains other than the system default domain by supplying a \var{domain} argument to the \function{nis.match()} and \function{nis.maps()} functions. @@ -1354,6 +1378,11 @@ this new feature with the \method{sort()} method's \code{key} parameter lets you easily sort lists using multiple fields. (Contributed by Raymond Hettinger.) +\item The \module{optparse} module was updated to version 1.5.1 of the +Optik library. The \class{OptionParser} class gained an +\member{epilog} attribute, a string that will be printed after the +help message, and a \method{destroy()} method to break reference +cycles created by the object. (Contributed by Greg Ward.) \item The \module{os} module underwent several changes. The \member{stat_float_times} variable now defaults to true, meaning that |