PyXR

c:\python24\lib \ email \ MIMEBase.py



0001 # Copyright (C) 2001-2004 Python Software Foundation
0002 # Author: Barry Warsaw
0003 # Contact: email-sig@python.org
0004 
0005 """Base class for MIME specializations."""
0006 
0007 from email import Message
0008 
0009 
0010 
0011 class MIMEBase(Message.Message):
0012     """Base class for MIME specializations."""
0013 
0014     def __init__(self, _maintype, _subtype, **_params):
0015         """This constructor adds a Content-Type: and a MIME-Version: header.
0016 
0017         The Content-Type: header is taken from the _maintype and _subtype
0018         arguments.  Additional parameters for this header are taken from the
0019         keyword arguments.
0020         """
0021         Message.Message.__init__(self)
0022         ctype = '%s/%s' % (_maintype, _subtype)
0023         self.add_header('Content-Type', ctype, **_params)
0024         self['MIME-Version'] = '1.0'
0025 

Generated by PyXR 0.9.4
SourceForge.net Logo