Skip to content

Instantly share code, notes, and snippets.

Daniel Walton baliw

Block or report user

Report or block baliw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
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.