Skip to content

Instantly share code, notes, and snippets.

View dannyob's full-sized avatar

Danny O'Brien dannyob

View GitHub Profile
@dannyob
dannyob / IDLE with asyncio + imaplib + mbsyncrc
Created October 4, 2018 06:53 — forked from boris-arzur/IDLE with asyncio + imaplib + mbsyncrc
I use a mail stack based on mbsync & notmuch. I want to run mbsync on new mails. IDLE allows watching efficiently one folder in my mailbox. Async makes is easy to watch a few connections.
#!python3
import imaplib
import os
import asyncio
loop = asyncio.get_event_loop()
conf = [x.strip().split() for x in open('mbsyncrc')]