def set_text(self, text): self.label.set_text(text) self.queue_draw() while gtk.events_pending(): gtk.main_iteration_do(False)