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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. '''Class representing text/* type MIME documents.'''
  5. __all__ = [
  6.     'MIMEText']
  7. from email.encoders import encode_7or8bit
  8. from email.mime.nonmultipart import MIMENonMultipart
  9.  
  10. class MIMEText(MIMENonMultipart):
  11.     '''Class for generating text/* type MIME documents.'''
  12.     
  13.     def __init__(self, _text, _subtype = 'plain', _charset = 'us-ascii'):
  14.         '''Create a text/* type MIME document.
  15.  
  16.         _text is the string for this message object.
  17.  
  18.         _subtype is the MIME sub content type, defaulting to "plain".
  19.  
  20.         _charset is the character set parameter added to the Content-Type
  21.         header.  This defaults to "us-ascii".  Note that as a side-effect, the
  22.         Content-Transfer-Encoding header will also be set.
  23.         '''
  24.         MIMENonMultipart.__init__(self, 'text', _subtype, **{
  25.             'charset': _charset })
  26.         self.set_payload(_text, _charset)
  27.  
  28.  
  29.