PyXR

c:\python24\lib \ email

Subpackages:

Modules

Init code



0001 # Copyright (C) 2001-2004 Python Software Foundation
0002 # Author: Barry Warsaw
0003 # Contact: email-sig@python.org
0004 
0005 """A package for parsing, handling, and generating email messages."""
0006 
0007 __version__ = '3.0b1'
0008 
0009 __all__ = [
0010     'base64MIME',
0011     'Charset',
0012     'Encoders',
0013     'Errors',
0014     'Generator',
0015     'Header',
0016     'Iterators',
0017     'Message',
0018     'MIMEAudio',
0019     'MIMEBase',
0020     'MIMEImage',
0021     'MIMEMessage',
0022     'MIMEMultipart',
0023     'MIMENonMultipart',
0024     'MIMEText',
0025     'Parser',
0026     'quopriMIME',
0027     'Utils',
0028     'message_from_string',
0029     'message_from_file',
0030     ]
0031 
0032 
0033 
0034 # Some convenience routines.  Don't import Parser and Message as side-effects
0035 # of importing email since those cascadingly import most of the rest of the
0036 # email package.
0037 def message_from_string(s, *args, **kws):
0038     """Parse a string into a Message object model.
0039 
0040     Optional _class and strict are passed to the Parser constructor.
0041     """
0042     from email.Parser import Parser
0043     return Parser(*args, **kws).parsestr(s)
0044 
0045 
0046 def message_from_file(fp, *args, **kws):
0047     """Read a file and parse its contents into a Message object model.
0048 
0049     Optional _class and strict are passed to the Parser constructor.
0050     """
0051     from email.Parser import Parser
0052     return Parser(*args, **kws).parse(fp)
0053 

Generated by PyXR 0.9.4
SourceForge.net Logo