glib

Avoiding warning from GLib with GLib.source_remove()

Avoiding warning from GLib with GLib.source_remove() Question: When I need a part of my program that has GLib timeout functions set with self.timeout_id = GLib.timeout_add_seconds(refresh, self._check_price) I use def stop(self): if self.timeout_id: GLib.source_remove(self.timeout_id) to make sure this timeout_id still exists before attempting to remove it. Yet I still get these pesky error messages from time …

Total answers: 2

What is the python equivalent of g_log_set_handler when using GLib from python

What is the python equivalent of g_log_set_handler when using GLib from python Question: I want to set the log level in my python glib project. Therefore I am looking for the g_log_set_handler() equivalent when using GLib from python via gi.repository. But the expected GLib.log_set_handler function seems to be missing. Here is a sample output of …

Total answers: 2