Show
Ignore:
Timestamp:
19/02/11 23:19:50 (15 months ago)
Author:
Menno Smits <menno@…>
Branch:
default
Message:

merged changes from another documentation working copy

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • imapclient/imapclient.py

    r239 r240  
    3232 
    3333class IMAPClient(object): 
    34     #XXX concepts to cover: UIDs, message lists, folder encoding, exceptions 
    3534    """ 
    36     Message unique identifiers (UID) can be used with any call. The use_uid 
    37     argument to the constructor and the use_uid attribute control whether UIDs 
    38     are used. 
    39  
    40     Any method that accepts message id's takes either a sequence containing 
    41     message IDs (eg. [1,2,3]) or a single message ID as an integer. 
    42  
    43     Any method that accepts message flags takes either a sequence containing 
    44     message flags (eg. [DELETED, 'foo', 'Bar']) or a single message flag (eg. 
    45     'Foo'). See the constants at the top of this file for commonly used flags. 
    46  
    47     Any method that takes a folder name will accept a standard string or a 
    48     unicode string. Unicode strings will be transparently encoded using 
    49     modified UTF-7 as specified by RFC-2060. Such folder names will be returned 
    50     as unicode strings by methods that return folder names. 
    51  
    52     Transparent folder name encoding can be enabled or disabled with the 
    53     folder_encode attribute. It defaults to True. 
    54  
    55     The IMAP related exceptions that will be raised by this class are: 
    56         IMAPClient.Error 
    57         IMAPClient.AbortError 
    58         IMAPClient.ReadOnlyError 
    59     These are aliases for the imaplib.IMAP4 exceptions of the same name. Socket 
    60     errors may also be raised in the case of network errors. 
     35    A connection to the IMAP server specified by *host* is made when 
     36    the class is instantiated. 
     37 
     38    *port* defaults to 143, or 993 if *ssl* is ``True``. 
     39 
     40    If *use_uid* is ``True`` unique message UIDs be used for all calls 
     41    that accept message ids (defaults to ``True``). 
     42 
     43    If *ssl* is ``True`` an SSL connection will be made (defaults to 
     44    ``False``). 
    6145    """ 
    6246 
     
    7054 
    7155    def __init__(self, host, port=None, use_uid=True, ssl=False): 
    72         """Initialise object instance and connect to the remote IMAP server. 
    73  
    74         @param host: The IMAP server address/hostname to connect to. 
    75         @param port: The port number to use (default is 143, 993 for SSL). 
    76         @param use_uid: Should message UIDs be used (default is True). 
    77         @param ssl: Make an SSL connection (default is False) 
    78         """ 
    7956        if ssl: 
    8057            ImapClass = imaplib.IMAP4_SSL 
     
    11693 
    11794    def has_capability(self, capability): 
    118         """Return True if the server has the *capability* specified. 
     95        """Return ``True`` if the IMAP server has the given *capability*. 
    11996        """ 
    12097        # FIXME: this will not detect capabilities that are backwards