from gi.repository import GLib, GObject class ObjWithProps(GObject.Object): @GObject.Property(type=int) def prop_with_underscore(self): return 5 @GObject.Property(type=int) def prop(self): return 4 def send_notify(self): self.notify('prop') self.notify('prop_with_underscore') def main(): loop = GLib.MainLoop.new(None, 0) def notify_1_callback(obj, pspec): print("Notify called for 'prop'") def notify_2_callback(obj, pspec): print("Notify called for 'prop_with_underscore'") loop.quit() obj = ObjWithProps() print("prop value: {}".format(obj.prop)) print("prop_with_underscores value: {}".format(obj.prop_with_underscore)) obj.connect('notify::prop', notify_1_callback) obj.connect('notify::prop_with_underscore', notify_2_callback) obj.send_notify() loop.run() main()