Logo Search packages:      
Sourcecode: offlineimap version File versions  Download package

offlineimap::imaplib::over Class Reference

Detailed Description

def __init__(self, tunnelcmd):
    IMAP4.__init__(self, tunnelcmd)

def open(self, host, port):
    self.outfd, self.infd = os.popen2(host, "t", 0)

def read(self, size):
    retval = ''
    while len(retval) < size:
        retval += self.infd.read(size - len(retval))
    return retval

def readline(self):
    return self.infd.readline()

def send(self, data):

def shutdown(self):

class sslwrapper:
def __init__(self, sslsock):
    self.sslsock = sslsock
    self.readbuf = ''

def write(self, s):
    return self.sslsock.write(s)

def _read(self, n):
    return self.sslsock.read(n)

def read(self, n):
    if len(self.readbuf):
        # Return the stuff in readbuf, even if less than n.
        # It might contain the rest of the line, and if we try to
        # read more, might block waiting for data that is not
        # coming to arrive.
        bytesfrombuf = min(n, len(self.readbuf))
        retval = self.readbuf[:bytesfrombuf]
        self.readbuf = self.readbuf[bytesfrombuf:]
        return retval
    retval = self._read(n)
    if len(retval) > n:
        self.readbuf = retval[n:]
        return retval[:n]
    return retval

def readline(self):
    retval = ''
    while 1:
        linebuf = self.read(1024)
        nlindex = linebuf.find("\n")
        if nlindex != -1:
            retval += linebuf[:nlindex + 1]
            self.readbuf = linebuf[nlindex + 1:] + self.readbuf
            return retval
            retval += linebuf

class IMAP4_SSL(IMAP4):

Definition at line 1028 of file imaplib.py.

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index