Tkinter and printf in C ...
sholden at holdenweb.com
Fri Jul 6 14:00:36 CEST 2001
"Chyr-Pyng Su" <cpsu at larc.ee.nthu.edu.tw> wrote in message
news:3B455B5D.544A2EF5 at larc.ee.nthu.edu.tw...
> Recently I have wrote a program in C, and start to write the GUI for it.
> I want to capture the message dump by the C program and show them on a
> text window.
> Does anyone have some idea to do that??? redirect the stdout???
Sorry, should have read the subject line. Here's a snippet of code that
write to a PMW scrolled text window, you should be able to do the same in a
Tkinter text window.
t = Pmw.ScrolledText(self.msgWindow)
grid(t, row=0, column=0, sticky=N+E+W+S)
message = mimecntl.MIME_document(strmes)
for hdr in ("from", "date", "subject", "to", "cc"):
hdrline = message[hdr]
t.insert(END, "%s: %s\n" %
It's the insert() method you are looking for, I suspect.
More information about the Python-list