How to read timedated properties from Python?
Manuel Reimer
Manuel.Spam at nurfuerspam.de
Mon May 21 08:26:47 UTC 2018
Hallo,
I tried for quite some time now, but so far, I failed.
What I want to do is to read some property of the timedated. In my
example code, I try to read "Timezone".
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
timedate_obj = bus.get_object('org.freedesktop.timedate1',
'/org/freedesktop/timedate1')
timedate = dbus.Interface(timedate_obj, "org.freedesktop.timedate1")
print(timedate.Get("Timezone"))
I also tried some variations of this, but keep getting errors.
Can someone please give me some information on how reading of properties
should work?
Thanks in advance
Manuel
More information about the dbus
mailing list