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

Class Message

Message --+
          |
         Message


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.
  getencoding(self)
  getmaintype(self)
  getparam(self, name)
  getparamnames(self)
  getplist(self)
  getsubtype(self)
  gettype(self)
  parseplist(self)
  parsetype(self)
    Inherited from Message
  __contains__(self, name)
Determine whether a message contains the named header.
  __delitem__(self, name)
Delete all occurrences of a specific header, if it is present.
  __getitem__(self, name)
Get a specific header, as from a dictionary.
  __iter__(self)
  __len__(self)
Get the number of headers in a message.
  __setitem__(self, name, value)
Set the value of a header.
  __str__(self)
  get(self, name, default)
Get the header value for a name.
  getaddr(self, name)
Get a single address from a header, as a tuple.
  getaddrlist(self, name)
Get a list of addresses from a header.
  getallmatchingheaders(self, name)
Find all header lines matching a given header name.
  getdate(self, name)
Retrieve a date field from a header.
  getdate_tz(self, name)
Retrieve a date field from a header as a 10-tuple.
  getfirstmatchingheader(self, name)
Get the first header line matching name.
  getheader(self, name, default)
Get the header value for a name.
  getheaders(self, name)
Get all values for a header.
  getrawheader(self, name)
A higher-level interface to getfirstmatchingheader().
  has_key(self, name)
Determine whether a message contains the named header.
  iscomment(self, line)
Determine whether a line should be skipped entirely.
  isheader(self, line)
Determine whether a given line is a legal header.
  islast(self, line)
Determine whether a line is a legal end of RFC 2822 headers.
  items(self)
Get all of a message's headers.
  keys(self)
Get all of a message's header field names.
  readheaders(self)
Read header lines.
  rewindbody(self)
Rewind the file to the start of the body (if seekable).
  setdefault(self, name, default)
  values(self)
Get all of a message's header field values.

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 2.1 on Fri Jul 27 17:40:03 2007 http://epydoc.sf.net