[Tutor] Programmatic access to email archives (was: constructing semi-arbitrary functions)
Ben Finney
ben+python at benfinney.id.au
Thu Feb 20 03:00:26 CET 2014
"André Walker-Loud <walksloud at gmail.com>" <walksloud at gmail.com> writes:
> and as a follow up - is there a way to download a thread from the
> tutor archive?
You've indicated you know this, but for other readers: The mailing list
archives are available <URL:https://mail.python.org/pipermail/tutor/> in
compressed “mbox” format, by month.
> 2) download the whole gzip’d text and use python to grab only the
> parts I want
A decent email client (such as Mutt, Gnus, Thunderbird, etc.) will be
able to open an mbox-format archive as a folder, and from there you can
filter and reply to messages as normal.
For programmatic access, the Python standard library ‘mailbox’ module
<URL:http://docs.python.org/3/library/mailbox.html> supports reading
“mbox”, and you then have all the Mailbox methods to select and extract
messages.
--
\ “Human reason is snatching everything to itself, leaving |
`\ nothing for faith.” —Saint Bernard, 1090–1153 |
_o__) |
Ben Finney
More information about the Tutor
mailing list