Skip to content

Instantly share code, notes, and snippets.

@rcaldwel
rcaldwel / gist:3829664
Created October 3, 2012 20:31
for curt
#!/usr/bin/env python
import os
dirs = ['/Users/rocaldwe/temp',
'/Users/rocaldwe/python',
'/Users/rocaldwe/bash']
found = False
def notify(title, subtitle=None):
"""Display a NSUserNotification on Mac OS X >= 10.8"""
from objc import lookUpClass
NSUserNotification = lookUpClass('NSUserNotification')
NSUserNotificationCenter = lookUpClass('NSUserNotificationCenter')
if not NSUserNotification or not NSUserNotificationCenter:
return
notification = NSUserNotification.alloc().init()
notification.setTitle_(str(title))