Python post osx notification -


using python wanting post message osx notification center. library need use? should write program in objective-c , call program python?


update

how access features of notification center 10.9 such buttons , text field?

you should install terminal-notifier first ruby example:

$ [sudo] gem install terminal-notifier 

and can use code:

import os  # notifier function def notify(title, subtitle, message):     t = '-title {!r}'.format(title)     s = '-subtitle {!r}'.format(subtitle)     m = '-message {!r}'.format(message)     os.system('terminal-notifier {}'.format(' '.join([m, t, s])))  # calling function notify(title    = 'a real notification',        subtitle = 'with python',        message  = 'hello, me, notifying you!') 

and there go:

enter image description here


Comments