Module mimetools :: Class Message
[show private | hide private]
[frames | no frames]

Class Message

Message --+
          |
         Message

Known Subclasses:
HTTPMessage

A derived class of rfc822.Message that knows about MIME headers and contains some hooks for decoding encoded and multipart messages.
Method Summary
  __init__(self, fp, seekable)
Initialize the class instance and read the headers.
  __contains__(self, name)
Determine whether a message contains the named header. (inherited from Message)
  __delitem__(self, name)
Delete all occurrences of a specific header, if it is present. (inherited from Message)
  __getitem__(self, name)
Get a specific header, as from a dictionary. (inherited from Message)
  __len__(self)
Get the number of headers in a message. (inherited from Message)
  __setitem__(self, name, value)
Set the value of a header. (inherited from Message)
  __str__(self)
(inherited from Message)
  get(self, name, default)
Get the header value for a name. (inherited from Message)
  getaddr(self, name)
Get a single address from a header, as a tuple. (inherited from Message)
  getaddrlist(self, name)
Get a list of addresses from a header. (inherited from Message)
  getallmatchingheaders(self, name)
Find all header lines matching a given header name. (inherited from Message)
  getdate(self, name)
Retrieve a date field from a header. (inherited from Message)
  getdate_tz(self, name)
Retrieve a date field from a header as a 10-tuple. (inherited from Message)
  getencoding(self)
  getfirstmatchingheader(self, name)
Get the first header line matching name. (inherited from Message)
  getheader(self, name, default)
Get the header value for a name. (inherited from Message)
  getheaders(self, name)
Get all values for a header. (inherited from Message)
  getmaintype(self)
  getparam(self, name)
  getparamnames(self)
  getplist(self)
  getrawheader(self, name)
A higher-level interface to getfirstmatchingheader(). (inherited from Message)
  getsubtype(self)
  gettype(self)
  has_key(self, name)
Determine whether a message contains the named header. (inherited from Message)
  iscomment(self, line)
Determine whether a line should be skipped entirely. (inherited from Message)
  isheader(self, line)
Determine whether a given line is a legal header. (inherited from Message)
  islast(self, line)
Determine whether a line is a legal end of RFC 2822 headers. (inherited from Message)
  items(self)
Get all of a message's headers. (inherited from Message)
  keys(self)
Get all of a message's header field names. (inherited from Message)
  parseplist(self)
  parsetype(self)
  readheaders(self)
Read header lines. (inherited from Message)
  rewindbody(self)
Rewind the file to the start of the body (if seekable). (inherited from Message)
  setdefault(self, name, default)
(inherited from Message)
  values(self)
Get all of a message's header field values. (inherited from Message)

Method Details

__init__(self, fp, seekable=1)
(Constructor)

Initialize the class instance and read the headers.
Overrides:
rfc822.Message.__init__ (inherited documentation)

Generated by Epydoc 1.1 on Thu Oct 16 16:37:23 2003 http://epydoc.sf.net