|
|
04-30-2010
, 05:59 AM
|
|
Posts: 883 |
Thanked: 976 times |
Joined on Jul 2007
@ Bern, Switzerland
|
#2
|
| The Following User Says Thank You to twaelti For This Useful Post: | ||
|
|
04-30-2010
, 12:27 PM
|
|
Posts: 11 |
Thanked: 24 times |
Joined on Apr 2010
@ Mashhad, Iran
|
#3
|
signal.signal(signal.SIGALRM, lambda signum, frame: self.update_calendar())
signal.alarm(int(86400 - (time.time() - time.mktime(time.strptime(time.strftime('%Y%m%d'), '%Y%m%d')))))
|
|
04-30-2010
, 12:41 PM
|
|
|
Posts: 1,311 |
Thanked: 3,735 times |
Joined on Sep 2007
@ Vienna, Austria
|
#4
|
|
|
04-30-2010
, 01:21 PM
|
|
Posts: 11 |
Thanked: 24 times |
Joined on Apr 2010
@ Mashhad, Iran
|
#5
|
|
|
05-01-2010
, 04:38 PM
|
|
Posts: 11 |
Thanked: 24 times |
Joined on Apr 2010
@ Mashhad, Iran
|
#6
|
import dbus from dbus.mainloop.glib import DBusGMainLoop DBusGMainLoop(set_as_default=True) bus = dbus.SystemBus() bus.add_signal_receiver(self.update_calendar, dbus_interface="com.nokia.alarmd", signal_name='time_change_ind', path='/com/nokia/alarmd')
![]() |
| Thread Tools | Search this Thread |
|
I'm writing a calendar widget for maemo5 using python something like datetoday-home-widget and I'm almost done. the only thing remained is that I don't know how to be informed when the date changes so I can redraw the widget.
Does any body know how to implement it in python or any reference or sample code?