GTK_DEBUG not respected when using Python + Gtk+

Viewed 288

I am using Python 3.6 and Gtk+ 3.22.18 on macOS Sierra 10.12.4 (both Python and Gtk+ installed via Homebrew). I've found that neither the GTK_DEBUG environment variable, nor the --gtk-debug argument have any effect. However:

  • They work for non-python apps, e.g. GTK_DEBUG=modules gtk3-demo
  • --gdk-debug and other arguments do work
  • Other environment variables are respected, e.g. GTK_THEME.

Only this doesn't work:

GTK_DEBUG=modules python hello.py

I'm pretty sure I'm using the same Gtk+ libraries for python and non-python apps. I've performed a search and only found one set of them.

I know Homebrew compiles Gtk+ with --enable-debug=minimal. To make sure that is not the culprit, I recompiled it without that flag, and can now use the Gtk inspector with --gtk-debug=interactive - but still only in C apps, not in Python apps. How can I use GTK_DEBUG?

0 Answers
Related