public
Last active

example of reading the www-talk 1991-1994 mbox archive with python

  • Download Gist
www_talk.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env python
 
# prints the subject lines for the www-talk 1991-1994 email archive
 
import os
import mailbox
 
os.system("wget http://dl.dropbox.com/u/2797650/www-talk_1991-1994.tar.gz")
os.system("tar xvfz www-talk_1991-1994.tar.gz")
 
for mbox_file in os.listdir("www-talk_1991-1994/data"):
for msg in mailbox.mbox("www-talk_1991-1994/data/" + mbox_file):
print msg["subject"]

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.