public
Created

Growl with Jython

  • Download Gist
growl.py
Python
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#!/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)

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.