[Tutor] Tkinter help
alan.gauld@bt.com
alan.gauld@bt.com
Fri, 24 Aug 2001 09:45:07 +0100
------_=_NextPart_001_01C12C79.1374EF20
Content-type: text/plain; charset="iso-8859-1"
When using Tkinter, i want to have a window within my GUI program that will
show the output that you normally see in the python interpreter window. for
example, i want to have a button display a list of data, but instead of that
data being displayed in the interpreter, i want it to appear in my actual
program in a widget. any ideas?
Its an idea, no more...
reassign sys.stdout to a file.
After every print call a function that copies that file to a
text widget.
it might work...
There is an example of this in Graysons book I think, but I
dont have access to it just now.
Alan G
------_=_NextPart_001_01C12C79.1374EF20
Content-type: text/html; charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.3013.2600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<BLOCKQUOTE
style="BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px">
<DIV><FONT size=2><FONT face=Arial>When using Tkinter, i want to have a window
within my GUI program that will show the output that you normally see in the
python interpreter window. for example, i want to have a button display
a list of data, but instead of that data being displayed in the interpreter, i
want it to appear in my actual program in a widget. any ideas?<FONT
color=#0000ff face="Courier New"><SPAN
class=640474508-24082001> </SPAN></FONT></FONT></FONT></DIV></BLOCKQUOTE>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>Its an idea, no
more...</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>reassign sys.stdout to a
file.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>After every print call a function that copies that file
to a </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>text widget.</SPAN></FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>it might work...</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>There is an example of this in Graysons book I think,
but I </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>dont have access to it just
now. </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT size=2><FONT face=Arial><FONT color=#0000ff face="Courier New"><SPAN
class=640474508-24082001>Alan G</SPAN></FONT></FONT></FONT></DIV></BODY></HTML>
------_=_NextPart_001_01C12C79.1374EF20--