mimify
index
/usr/lib/python1.6/mimify.py

Mimification and unmimification of mail messages.
 
Decode quoted-printable parts of a mail message or encode using
quoted-printable.
 
Usage:
        mimify(input, output)
        unmimify(input, output, decode_base64 = 0)
to encode and decode respectively.  Input and output may be the name
of a file or an open file object.  Only a readline() method is used
on the input file, only a write() method is used on the output file.
When using file names, the input and output file names may be the
same.
 
Interactive usage:
        mimify.py -e [infile [outfile]]
        mimify.py -d [infile [outfile]]
to encode and decode respectively.  Infile defaults to standard
input and outfile to standard output.

 
Modules
            
re
string
sys

 
Classes
            
File
HeaderFile

 
class File
      A simple fake file object that knows about limited read-ahead and
boundaries.  The only supported method is readline().
 
  
__init__(self, file, boundary)
readline(self)

 
class HeaderFile
       
  
__init__(self, file)
readline(self)

 
Functions
            
mime_decode(line)
Decode a single line of quoted-printable text to 8bit.
mime_decode_header(line)
Decode a header line to 8bit.
mime_encode(line, header)
Code a single line as quoted-printable.
If header is set, quote some extra characters.
mime_encode_header(line)
Code a single header line as quoted-printable.
mimify(infile, outfile)
Convert 8bit parts of a MIME mail message to quoted-printable.
mimify_part(ifile, ofile, is_mime)
Convert an 8bit part of a MIME mail message to quoted-printable.
unmimify(infile, outfile, decode_base64=0)
Convert quoted-printable parts of a MIME mail message to 8bit.
unmimify_part(ifile, ofile, decode_base64=0)
Convert a quoted-printable part of a MIME mail message to 8bit.

 
Data
             CHARSET = 'ISO-8859-1'
MAXLEN = 200
QUOTE = '> '
__file__ = '/usr/lib/python1.6/mimify.pyc'
__name__ = 'mimify'
base64_re = <SRE_Pattern object at 854e000>
chrset = <SRE_Pattern object at 8557ee8>
cte = <SRE_Pattern object at 856a7a0>
he = <SRE_Pattern object at 84204f0>
iso_char = <SRE_Pattern object at 83dbfa0>
mime_char = <SRE_Pattern object at 8541458>
mime_code = <SRE_Pattern object at 83a35d8>
mime_head = <SRE_Pattern object at 855e568>
mime_header = <SRE_Pattern object at 8563ec8>
mime_header_char = <SRE_Pattern object at 8561c40>
mp = <SRE_Pattern object at 8552038>
mv = <SRE_Pattern object at 84d1bd8>
qp = <SRE_Pattern object at 8549028>
repl = <SRE_Pattern object at 8421468>