First you need to install the library. You can compile it yourself but you can also easy install it
sudo easy_install-2.6 py-Growl
Then you can test it
>>> import Growl
/Library/Python/2.6/site-packages/py_Growl-0.0.7-py2.6-macosx-10.6-universal.egg/Growl.py:17: DeprecationWarning: the md5 module is deprecated; use hashlib instead
>>> gn = Growl.GrowlNotifier("overtime",['overtime'])
>>> gn.register()
>>> gn.notify("overtime","Are you still working?","Yes I am!")
(Code from http://prehensile.co.uk/blog/?p=92)
This should display a message if you have installed Growl
I also created a small script that you run directly from cli if you don't like python. You can run it like this in the terminal
$ ./gnotify "Some Test" "A very good test"
(download)
BTW SQLAlchemy also install easily via easy_install-2.6 on Mac :)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.