bcoe/imaplib2 — pull request #1 by rfadams (2013-10-18 22:49:08+00:00)
Title: Modified  to support queries using the "*:*" notation

In imaplib, this works:

M.select(mailbox,readonly=True)
status, data = M.uid('FETCH', '1:*' , '(RFC822)')

Here is the docs where it shows how to use the command: http://docs.python.org/2/library/imaplib.html#imap4-objects .

I modified the mustquote regex to also support these style of commands.