[Twisted-Python] Question : PyNotify call from twist daemon

bino oetomo bino at indoakses-online.com
Tue Mar 6 03:56:29 EST 2012

Dear All ...

I have a Serial service in my twisted script

Inside my 'class ArduinoReceiver(LineReceiver):' ,
I have a function like :
     def setdisplay(self, dispmode):
         global mynotify
         self.ntf_title = 'TOMBOL'
         self.ntf_body = 'Coba aja'
         try :
         except :
         print 'Try to display button notification %s' % (dispmode)
         mynotify = pynotify.Notification(self.ntf_title, self.ntf_body)
         print 'MYNOTIFY ', str(mynotify)


When I try to run my tac file , and do something that will call that 
'setdisplay' function , there is no notification poped-up
But from the log file .. I got
2012-03-06 08:47:51+0000 [-] MYNOTIFY <pynotify.Notification object at 
0x96a5b6c (NotifyNotification at 0x9665d90)>

I made a test using shiped example :
#!/usr/bin/env python

import pygtk
import pynotify
import sys

if __name__ == '__main__':
     if not pynotify.init("Markup"):

     n = pynotify.Notification("Summary",
         "Some <b>bold</b>, <u>underlined</u>, <i>italic</i>, " +
         "<a href='http://www.google.com'>linked</a> text")

     if not n.show():
         print "Failed to send notification"

It work just fine.

My system is : Ubuntu maveric, with just Xorg and OpenBox

Kindly please give me any of your enlightment to fix this problem


More information about the Twisted-Python mailing list