def show_warning(message):
 try:
  import Tkinter, tkMessageBox
  root = Tkinter.Tk()
  root.withdraw()
  tkMessageBox.showerror('Spyder', message)
 except ImportError:
  pass
 raise RuntimeError(message)

def show_warning ( message ) : try : import Tkinter , tkMessageBox root = Tkinter . Tk ( ) root . withdraw ( ) tkMessageBox . showerror ( 'Spyder' , message ) except ImportError : pass raise RuntimeError ( message )
show warning using tkinter if available .