| | |
- a2b_qp(...)
- Decode a string of qp-encoded data
- b2a_qp(...)
- b2a_qp(data, quotetabs=0, istext=1, header=0) -> s;
Encode a string using quoted-printable encoding.
On encoding, when istext is set, newlines are not encoded, and white
space at end of lines is. When istext is not set, \r and \n (CR/LF) are
both encoded. When quotetabs is set, space and tabs are encoded.
- decode(input, output, header=0)
- Read 'input', apply quoted-printable decoding, and write to 'output'.
'input' and 'output' are files with readline() and write() methods.
If 'header' is true, decode underscore as space (per RFC 1522).
- decodestring(s, header=0)
- encode(input, output, quotetabs, header=0)
- Read 'input', apply quoted-printable encoding, and write to 'output'.
'input' and 'output' are files with readline() and write() methods.
The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted. Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
The 'header' flag indicates whether we are encoding spaces as _ as per
RFC 1522.
- encodestring(s, quotetabs=0, header=0)
- ishex(c)
- Return true if the character 'c' is a hexadecimal digit.
- main()
- needsquoting(c, quotetabs, header)
- Decide whether a particular character needs to be quoted.
The 'quotetabs' flag indicates whether embedded tabs and spaces should be
quoted. Note that line-ending tabs and spaces are always encoded, as per
RFC 1521.
- quote(c)
- Quote a single character.
- unhex(s)
- Get the integer value of a hexadecimal number.
|