I\'m trying to extract email addresses from plain text transcripts of emails. I\'ve cobbled together a bit of code to find the addresses themselves, but I don\'t know how to mak
import email msg = email.message_from_string(str) # or # f = open(file) # msg = email.message_from_file(f) msg['from'] # and optionally from email.utils import parseaddr addr = parseaddr(msg['from'])