Created
June 18, 2011 02:57
-
-
Save laclefyoshi/1032757 to your computer and use it in GitHub Desktop.
Growl with Jython
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
# Copyright : (c) SAEKI Yoshiyasu | |
# License : MIT-style license | |
# <http://www.opensource.org/licenses/mit-license.php> | |
# last updated: 2011/06/18 | |
import sys | |
sys.path.append("./Growl.jar") | |
from info.growl import GrowlUtils | |
from javax.imageio import ImageIO | |
notificationName = "My Message" | |
growl = GrowlUtils.getGrowlInstance("My Growl") | |
growl.addNotification(notificationName, True) | |
growl.register() | |
growl.sendNotification(notificationName, "Title", "Body text") | |
icon = ImageIO.read(GrowlUtils().getClass().getResource("/images/duke.gif")) | |
growl.sendNotification(notificationName, "Hello", "World", icon) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment