项目
在 GitHub 查看
syabruk/pync
关于
Python wrapper for Mac OS 10.8 Notification Center
开发工具实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文pync
A simple Python wrapper around the terminal-notifier command-line tool (version 2.0.0), which allows you to send User Notifications to the Notification Center on Mac OS X 10.10, or higher.

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.notify('Hello World', appIcon='https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
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.notify('Hello World', appIcon='https://assets-cdn.github.com/images/modules/logos_page/Octocat.png')
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.
探索相关项目
加载中…