Skip to content

Instantly share code, notes, and snippets.

Daniel Walton baliw

View GitHub Profile
@baliw
baliw / mlnotifications.py
Created Nov 5, 2012
Mountain Lion Notification Center via Python
View mlnotifications.py
import Foundation
import objc
import AppKit
import sys
NSUserNotification = objc.lookUpClass('NSUserNotification')
NSUserNotificationCenter = objc.lookUpClass('NSUserNotificationCenter')
def notify(title, subtitle, info_text, delay=0, sound=False, userInfo={}):
notification = NSUserNotification.alloc().init()
You can’t perform that action at this time.