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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Base class for MIME specializations.'''
  5. __all__ = [
  6.     'MIMEBase']
  7. from email import message
  8.  
  9. class MIMEBase(message.Message):
  10.     '''Base class for MIME specializations.'''
  11.     
  12.     def __init__(self, _maintype, _subtype, **_params):
  13.         '''This constructor adds a Content-Type: and a MIME-Version: header.
  14.  
  15.         The Content-Type: header is taken from the _maintype and _subtype
  16.         arguments.  Additional parameters for this header are taken from the
  17.         keyword arguments.
  18.         '''
  19.         message.Message.__init__(self)
  20.         ctype = '%s/%s' % (_maintype, _subtype)
  21.         self.add_header('Content-Type', ctype, **_params)
  22.         self['MIME-Version'] = '1.0'
  23.  
  24.  
  25.