def call_display(self, widget, data): for index in range(len(self.plus)): if widget == self.plus[index]: print 'current button index:', index break msg_read.main(index, self.message)
def call_display(self,widget,data): for index in range(len(self.plus)): if widget==self.plus[index]: print 'current button index:' ,index break msg_read.main(index,self.message)
def parse_js_obj(self,message_data): self.decoded = json.loads(message_data) print 'DECODED:', self.decoded print self.decoded[0]['content'] fob = open('dwrite' ,'w') for item in self.decoded: fob.write("%s\n" % item) fob.close() msg_read.main()
def parse_js_obj(self, message_data): self.decoded = json.loads(message_data) print 'DECODED:', self.decoded print self.decoded[0]['content'] fob = open('dwrite', 'w') for item in self.decoded: fob.write("%s\n" % item) fob.close() msg_read.main()
def parse_js_obj(self,message_data): self.decoded = json.loads(message_data) print 'DECODED:', self.decoded print self.decoded[0]['data']['message'] fob = open('dwrite' ,'w') for item in self.decoded: fob.write("%s\n" % item) fob.close() pynotify.init ("Hello world") Hello=pynotify.Notification ("Message Received!","You have an unread message..","dialog-information") Hello.show () pynotify.uninit () msg_read.main()