Hello, Suppose I want to run from within a Python GUI app some long-output shell call. For example, from within Python I might want to call
g++ foo.cpp I already know there are many ways to do this, e.g., commands.getstatusoutput('g++ foo.cpp') to name one. The problem is that this might generate a ton of output (e.g., because of compilation errors), and might take a while to do so. In my GUI, I'd like to print out the output as it's being generated, not wait until all is done (as commands.getstatusoutput will do) and dump it at once. So my question is if there's a way to "grab" the output as it's being generated. It doesn't matter if the solution is blocking (as opposed to callback based), since threads can handle this. I just don't know how to "grab" the output. I appreciate your time in reading (and answering this), as I've been googling several hours for this. Many Thanks, E -- http://mail.python.org/mailman/listinfo/python-list