home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / lib / python2.6 / email / mime / message.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  1.4 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Class representing message/* MIME documents.'''
  5. __all__ = [
  6.     'MIMEMessage']
  7. from email import message
  8. from email.mime.nonmultipart import MIMENonMultipart
  9.  
  10. class MIMEMessage(MIMENonMultipart):
  11.     '''Class representing message/* MIME documents.'''
  12.     
  13.     def __init__(self, _msg, _subtype = 'rfc822'):
  14.         '''Create a message/* type MIME document.
  15.  
  16.         _msg is a message object and must be an instance of Message, or a
  17.         derived class of Message, otherwise a TypeError is raised.
  18.  
  19.         Optional _subtype defines the subtype of the contained message.  The
  20.         default is "rfc822" (this is defined by the MIME standard, even though
  21.         the term "rfc822" is technically outdated by RFC 2822).
  22.         '''
  23.         MIMENonMultipart.__init__(self, 'message', _subtype)
  24.         if not isinstance(_msg, message.Message):
  25.             raise TypeError('Argument is not an instance of Message')
  26.         isinstance(_msg, message.Message)
  27.         message.Message.attach(self, _msg)
  28.         self.set_default_type('message/rfc822')
  29.  
  30.  
  31.