diff options
author | Barry Warsaw <barry@python.org> | 2001-06-19 19:07:46 (GMT) |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 2001-06-19 19:07:46 (GMT) |
commit | 9b630a50200e44e16acfe3dee4052b3d0b0677e4 (patch) | |
tree | 9b9d9a753241e22f9bf6ff2844e9e06075fbd964 /Lib/distutils/extension.py | |
parent | e275c42c38f7a83275de027b200b39460b3ec7b7 (diff) | |
download | cpython-9b630a50200e44e16acfe3dee4052b3d0b0677e4.zip cpython-9b630a50200e44e16acfe3dee4052b3d0b0677e4.tar.gz cpython-9b630a50200e44e16acfe3dee4052b3d0b0677e4.tar.bz2 |
Better support for RFC 1521 quoted-printable specification, along with
addition of interface for consistency with base64 module. Namely,
encodestring(), decodestring(): New functions which accept a string
object and return a string object. They just wrap the string in
StringIOs and pass them to the encode() and decode() methods
respectively. encodestring() accepts a default argument of quotetabs,
defaulting to zero, which is passed on straight through to encode().
encode(): Fix the bug where an extra newline would always be added to
the output, which prevented an idempotent roundtrip through
encode->decode. Now, if the source string doesn't end in a newline,
then the result string won't end in a newline.
Also, extend the quotetabs argument semantics to include quoting
embedded strings, which is also optional according to the RFC.
test() -> main()
"from quopri import *" also imports encodestring() and decodestring().
Diffstat (limited to 'Lib/distutils/extension.py')
0 files changed, 0 insertions, 0 deletions