diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-05-16 19:05:53 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-05-16 19:05:53 (GMT) |
commit | b8cd3e4e30d3219ecf00ce7f114a15746561ea87 (patch) | |
tree | 062ec0ea886b1015e47f932d4676ee2dced7c85d /Lib/poplib.py | |
parent | 8eb1f077c2be03f72ef31ddd2cfe805ffbfbd524 (diff) | |
download | cpython-b8cd3e4e30d3219ecf00ce7f114a15746561ea87.zip cpython-b8cd3e4e30d3219ecf00ce7f114a15746561ea87.tar.gz cpython-b8cd3e4e30d3219ecf00ce7f114a15746561ea87.tar.bz2 |
#21804: Add RFC 6856 (UTF8) support to poplib.
Patch by Milan Oberkirch.
Diffstat (limited to 'Lib/poplib.py')
-rw-r--r-- | Lib/poplib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/poplib.py b/Lib/poplib.py index 4915628..f672390 100644 --- a/Lib/poplib.py +++ b/Lib/poplib.py @@ -71,6 +71,7 @@ class POP3: UIDL [msg] uidl(msg = None) CAPA capa() STLS stls() + UTF8 utf8() Raises one exception: 'error_proto'. @@ -348,6 +349,12 @@ class POP3: return self._longcmd('UIDL') + def utf8(self): + """Try to enter UTF-8 mode (see RFC 6856). Returns server response. + """ + return self._shortcmd('UTF8') + + def capa(self): """Return server capabilities (RFC 2449) as a dictionary >>> c=poplib.POP3('localhost') |