Re: how do i use "tkinter.createfilehandler" with a regular c program?

2005-11-14 Thread Jo Schambach
Thanks, that seems to work. maybe one more question on this subject: how can i use the callback function to the "createfilehandler" call from within a class? in other words, what would be the signature of the callback function, if I made it a member of a class? The documentation says that the cal

Re: how do i use "tkinter.createfilehandler" with a regular c program?

2005-11-14 Thread Jim Segrave
In article <[EMAIL PROTECTED]>, Jo Schambach <[EMAIL PROTECTED]> wrote: >I am trying to write a GUI with tkinter that displays the stdout from a >regular C/C++ program in a text widget. >The idea i was trying to use was as follows: > >1) use "popen" to execute the C/C++ program >2) then use "tkint

Re: how do i use "tkinter.createfilehandler" with a regular c program?

2005-11-14 Thread jepler
Compared to your program, I * Made sure that the slave program actually flushed its stdout buffers * didn't call read(), which will by default continue reading until it reaches EOF, not merely read the available data #!/usr/bin/env python import sys, time, Tkinter, itertools, _tkinter, os if

how do i use "tkinter.createfilehandler" with a regular c program?

2005-11-14 Thread Jo Schambach
I am trying to write a GUI with tkinter that displays the stdout from a regular C/C++ program in a text widget. The idea i was trying to use was as follows: 1) use "popen" to execute the C/C++ program 2) then use "tkinter.createfilehandler" to create a callback that would be called when the C/C++