Show
Ignore:
Timestamp:
12/17/09 12:00:01 (2 years ago)
Author:
Menno Smits <menno@…>
Branch:
default
Message:

committing response parser progress so far, lots of failing tests

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • run_altfetch.py

    r105 r109  
    11from pprint import pprint 
    22from imapclient import IMAPClient 
     3from imapclient.response_parser import parse_response 
    34 
    45def main(): 
     
    89    msgs = i.search() 
    910    i._imap.debug = 5 
    10     lines = i.altfetch(msgs[0], ['RFC822']) 
     11    lines = i.altfetch(msgs, ['ENVELOPE', 'BODYSTRUCTURE']) 
    1112 
    12     print lines[0] 
    13     body = '\r\n'.join(lines[1:-1]) 
    14     body += '\r\n' 
    15     print body 
    16     print len(body) 
     13    body = '\r\n'.join(lines) 
     14    #body += '\r\n' 
    1715 
     16    for x in parse_response(body): 
     17        print x 
    1818 
    1919if __name__ == '__main__':