I am working on a python program that generates output continuosly, Depending upon the user input. I am unable to show this output on Tkinter gui. Without tkinter it just works perfectly on terminal. Could you please suggest some code that will show the output on thr gui.
Here is my python code: Program 1:-
print "Enter a file name:",
filename = raw_input()
print filename
This program is executed with gui using second program. Program 2:-
import os
from Tkinter
import * root = Tk()
t = Text(root)
t.pack()
def go():
p = os.popen("python hello.py")
for l in p.xreadlines():
t.insert(END, '%s\n' % l.rstrip())
t.see(END)
t.update_idletasks()
Button(root, text='Go', command=go).pack()
root.mainloop()
Now I want the output to be shown inside tkinter GUI.