Source

bucho / bucho / compat.py

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