[Python-checkins] CVS: python/dist/src/Lib imaplib.py,1.27,1.28
Guido van Rossum
gvanrossum@users.sourceforge.net
Sun, 17 Jun 2001 06:31:28 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv31273
Modified Files:
imaplib.py
Log Message:
SF patch #433619, by Michel Pelletier:
Summary: NAMESPACE support in imaplib.py
Initial Comment:
Support for the IMAP NAMESPACE extension defined in rfc
2342. This is almost a necessity for working with
modern IMAP servers.
Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** imaplib.py 2001/02/22 13:24:27 1.27
--- imaplib.py 2001/06/17 13:31:25 1.28
***************
*** 59,62 ****
--- 59,63 ----
'UID': ('SELECTED',),
'UNSUBSCRIBE': ('AUTH', 'SELECTED'),
+ 'NAMESPACE': ('AUTH', 'SELECTED'),
}
***************
*** 572,575 ****
--- 573,582 ----
return apply(self._simple_command, (name,) + args)
+ def namespace(self):
+ """ Returns IMAP namespaces ala rfc2342
+ """
+ name = 'NAMESPACE'
+ typ, dat = self._simple_command(name)
+ return self._untagged_response(typ, dat, name)