Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
imaplib.IMAP4_stream Class Reference

List of all members.

Public Member Functions

def __init__
def open
def read
def readline
def send
def shutdown

Public Attributes

 command
 host
 port
 sock
 file
 process
 writefile
 readfile

Detailed Description

IMAP4 client class over a stream

Instantiate with: IMAP4_stream(command)

        where "command" is a string that can be passed to subprocess.Popen()

for more documentation see the docstring of the parent class IMAP4.

Definition at line 1211 of file imaplib.py.


Constructor & Destructor Documentation

def imaplib.IMAP4_stream.__init__ (   self,
  command 
)

Definition at line 1223 of file imaplib.py.

01223 
01224     def __init__(self, command):
01225         self.command = command
01226         IMAP4.__init__(self)
01227 

Here is the caller graph for this function:


Member Function Documentation

def imaplib.IMAP4_stream.open (   self,
  host = None,
  port = None 
)
Setup a stream connection.
This connection will be used by the routines:
    read, readline, send, shutdown.

Definition at line 1228 of file imaplib.py.

01228 
01229     def open(self, host = None, port = None):
01230         """Setup a stream connection.
01231         This connection will be used by the routines:
01232             read, readline, send, shutdown.
01233         """
01234         self.host = None        # For compatibility with parent class
01235         self.port = None
01236         self.sock = None
01237         self.file = None
01238         self.process = subprocess.Popen(self.command,
01239             stdin=subprocess.PIPE, stdout=subprocess.PIPE,
01240             shell=True, close_fds=True)
01241         self.writefile = self.process.stdin
01242         self.readfile = self.process.stdout

def imaplib.IMAP4_stream.read (   self,
  size 
)
Read 'size' bytes from remote.

Definition at line 1243 of file imaplib.py.

01243 
01244     def read(self, size):
01245         """Read 'size' bytes from remote."""
01246         return self.readfile.read(size)
01247 

Here is the caller graph for this function:

Read line from remote.

Definition at line 1248 of file imaplib.py.

01248 
01249     def readline(self):
01250         """Read line from remote."""
01251         return self.readfile.readline()
01252 

Here is the caller graph for this function:

def imaplib.IMAP4_stream.send (   self,
  data 
)
Send data to remote.

Definition at line 1253 of file imaplib.py.

01253 
01254     def send(self, data):
01255         """Send data to remote."""
01256         self.writefile.write(data)
01257         self.writefile.flush()
01258 

Here is the caller graph for this function:

Close I/O established in "open".

Definition at line 1259 of file imaplib.py.

01259 
01260     def shutdown(self):
01261         """Close I/O established in "open"."""
01262         self.readfile.close()
01263         self.writefile.close()
01264         self.process.wait()
01265 
01266 


Member Data Documentation

Definition at line 1224 of file imaplib.py.

Definition at line 1236 of file imaplib.py.

Definition at line 1233 of file imaplib.py.

Definition at line 1234 of file imaplib.py.

Definition at line 1237 of file imaplib.py.

Definition at line 1241 of file imaplib.py.

Definition at line 1235 of file imaplib.py.

Definition at line 1240 of file imaplib.py.


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