diff options
Diffstat (limited to 'Lib/imaplib.py')
-rw-r--r-- | Lib/imaplib.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 2a0eeb6..4706eea 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -58,6 +58,7 @@ Commands = { 'SUBSCRIBE': ('AUTH', 'SELECTED'), 'UID': ('SELECTED',), 'UNSUBSCRIBE': ('AUTH', 'SELECTED'), + 'NAMESPACE': ('AUTH', 'SELECTED'), } # Patterns to match server responses @@ -571,6 +572,12 @@ class IMAP4: raise self.error('unknown extension command: %s' % name) 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) # Private methods |