#!/usr/bin/env python from Tkinter import * from threading import Thread def input_loop(): while True: cmd = raw_input('Yes? > ') print 'Got cmd', cmd root = Tk() w = Label(root, text="Hello, world!") w.pack() t = Thread(target=input_loop) t.start() root.mainloop()