[code.view]

[top] / python / PyMOTW / imaplib / imaplib_list_pattern.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2008 Doug Hellmann All rights reserved.
     #
     """
     """
     
     __version__ = "$Id$"
     #end_pymotw_header
     
     import imaplib
     
     from imaplib_connect import open_connection
     
     if __name__ == '__main__':
         c = open_connection()
         try:
             typ, data = c.list(pattern='*Archive*')
         finally:
             c.logout()
         print 'Response code:', typ
     
         for line in data:
             print 'Server response:', line
     

[top] / python / PyMOTW / imaplib / imaplib_list_pattern.py

contact | logmethods.com