Skip to content

Instantly share code, notes, and snippets.

@laclefyoshi
Created June 18, 2011 02:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laclefyoshi/1032757 to your computer and use it in GitHub Desktop.
Save laclefyoshi/1032757 to your computer and use it in GitHub Desktop.
Growl with Jython
#!/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