Yuan HOng ha scritto: > In my program I have to call an external program and parse its output. > For that I use the os.popen2 function, and then read the output > stream. > > But the complexity is that the external program gives back its output > in a piecemeal manner, with long delays between the outputs. In the > main program I want to therefore read the output in a non-blocking > manner, to read as many bytes as the child process is spitting out. > > The question is, how can I achieve that? >
What about using a thread to control the child process? Licia -- http://mail.python.org/mailman/listinfo/python-list