The UI code blocked the main process.
Here is my modification:
from Tkinter import *
import threading
class UIChanger(threading.Thread):
def run(self):
config = raw_input()
while config != 'over':
button.config(fg=config)
button.pack()
config = raw_input()
print "Quit console input"
ui_changer = UIChanger()
ui_changer.start()
master = Tk()
button=Button(master,text="hello", fg="blue")
button.pack()
master.mainloop()
print "Game Over"
See the
screenshot[
^].