Source

bucho / bucho / compat.py

enable_gui = True
Tkinter = None
try:
    import Tkinter
except ImportError:
    try:
        import tkinter as Tkinter
    except:
        enable_gui = False