I have a pygtk application and would like to provide a text-based fallback mode for it. When mporting gtk without a X display available I see only a GtkWarning on stderr but no exception I could take advantage of and checking for DISPLAY seems like an ugly hack. How can I implement this?
A:
Checking gtk.gdk.screen_get_default()
does it, however there seems no way to suppress the GTK warnings.
gber
2010-10-12 16:49:21