Skip to content
forked from syabruk/pync

Python wrapper for Mac OS 10.8 Notification Center

License

Notifications You must be signed in to change notification settings

adamist521/pync

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pync

A simple Python wrapper around the terminal-notifier command-line tool (version 1.6.1), which allows you to send User Notifications to the Notification Center on Mac OS X 10.8, or higher.

Screenshot

Installation

pip install pync

or

pip install git+https://github.com/SeTeM/pync.git

or

git clone git://github.com/SeTeM/pync.git
cd pync
python setup.py install

Usage

For full information on all the options, see the tool’s README.

Examples:

Using the notify function

import pync

pync.notify('Hello World')
pync.notify('Hello World', title='Python')
pync.notify('Hello World', group=os.getpid())
pync.notify('Hello World', activate='com.apple.Safari')
pync.notify('Hello World', open='http://github.com/')
pync.notify('Hello World', execute='say "OMG"')

pync.remove_notifications(os.getpid())

pync.list_notifications(os.getpid())

Using the notifier object

from pync import Notifier

Notifier.notify('Hello World')
Notifier.notify('Hello World', title='Python')
Notifier.notify('Hello World', group=os.getpid())
Notifier.notify('Hello World', activate='com.apple.Safari')
Notifier.notify('Hello World', open='http://github.com/')
Notifier.notify('Hello World', execute='say "OMG"')

Notifier.remove(os.getpid())

Notifier.list(os.getpid())

License

All the works are available under the MIT license. Except for ‘Terminal.icns’, which is a copy of Apple’s Terminal.app icon and as such is copyright of Apple.

See LICENSE for details.

About

Python wrapper for Mac OS 10.8 Notification Center

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%