tags:

views:

16

answers:

1

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