Checking to see if Gtk mainloop is running
Asked Answered
K

1

6

Is there a way that I can check to see if the Gtk.main() loop is alive? Similar to the threading.is_alive() function? Any help is much appreciated :)

Kaduna answered 23/6, 2017 at 22:2 Comment(0)
D
8

You can use the Gtk.main_level() function:

 Gtk.main_level()
    Returns:    the nesting level of the current invocation of the main loop

In other words, a return value of 0 means no mainloop is running.

Debbydebee answered 23/6, 2017 at 22:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.