PyDocs

Nav

Internet Protocols and Support

IMAP4.idle

imaplib

method of IMAP4 · Added in 3.14 (source) not WASI
  • IMAP4.idle(duration=None)
Return an iterable IDLE context manager producing untagged responses.
If the argument is not None, limit iteration to 'duration' seconds.

with M.idle(duration=29 * 60) as idler:
    for typ, data in idler:
        print(typ, data)

Note: 'duration' requires a socket connection (not IMAP4_stream).
1 Example
>>> with M.idle(duration=29 * 60) as idler:
...     for typ, data in idler:
...         print(typ, data)
...
EXISTS [b'1']
RECENT [b'1']
from the Python docs
See Also
No see-alsos for imaplib/IMAP4.idle
0 Notes
No notes for IMAP4.idle