June 2000
Intermediate to advanced
556 pages
8h 45m
English
The following code fragment shows the control structure required to process a Eudora mailbox into individual e-mail messages. The processing of each message has been delegated to the ProcessMessage function. This function is used by both the Linux and Eudora converters. Note how the sentinel string "From ???@???" is used to chop the contents of the mailbox into individual messages.
CD-ROM reference=14005.txt def DoEudoraMailbox(f): # f is a file object. # Chop the contents of a Eudora mailbox # into individual messages for processing # by the ProcessMessage subroutine. Message = [] L = f.readline() while L: if string.find(L,"From ???@???")!=-1: # Full message accumulated in the Message # list, so process it ...
Read now
Unlock full access