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
(self, duration=None)
| 670 | |
| 671 | |
| 672 | def idle(self, duration=None): |
| 673 | """Return an iterable IDLE context manager producing untagged responses. |
| 674 | If the argument is not None, limit iteration to 'duration' seconds. |
| 675 | |
| 676 | with M.idle(duration=29 * 60) as idler: |
| 677 | for typ, data in idler: |
| 678 | print(typ, data) |
| 679 | |
| 680 | Note: 'duration' requires a socket connection (not IMAP4_stream). |
| 681 | """ |
| 682 | return Idler(self, duration) |
| 683 | |
| 684 | |
| 685 | def list(self, directory='""', pattern='*'): |