Skip to content

Instantly share code, notes, and snippets.

@bhundven
bhundven / email_notifier.py
Last active August 9, 2021 09:21
python mutt+maildir notifier using python
#!/usr/bin/python2
# Based on: https://bbs.archlinux.org/viewtopic.php?pid=962423#p962423
# This version is modified to handle mailboxes with spaces in the names
import pyinotify
import pynotify
from os.path import expanduser
from mailbox import MaildirMessage
from email.header import decode_header
from gtk.gdk import pixbuf_new_from_file