R
rantingrick
I am wondering how i might pipe stdout && stderr to a Tkinter Label
widget. here are a few ways to set the text
#-- Create a label --#
label = Label(master, text='Default Text')
label.pack()
# -- two ways to change the text --#
label['text'] = 'New Text'
label.configure(text='New Text')
#-- or use a control variable --#
v = StringVar(master)
label.config(textvariable=v)
#-- Change useing variable --#
v.set('NewText')
So my question is -- I know hoe to set the text displayed in the label
wiget, but hoow do i capture stdout and send that to the widget?
widget. here are a few ways to set the text
#-- Create a label --#
label = Label(master, text='Default Text')
label.pack()
# -- two ways to change the text --#
label['text'] = 'New Text'
label.configure(text='New Text')
#-- or use a control variable --#
v = StringVar(master)
label.config(textvariable=v)
#-- Change useing variable --#
v.set('NewText')
So my question is -- I know hoe to set the text displayed in the label
wiget, but hoow do i capture stdout and send that to the widget?