How do I send the output of an external process to a gtk.TextView without freezing the GUI?
The problem here is to avoid waiting for the external process to finish. That can easily be done with threads but it should be possible to get it working using pipes in non-blocking IO mode and monitoring output using the gobject.io_add_watch() function. The problem with this last approach is that only sockets, not pipes, can be used with the select interface in Win32… so that solution seems not too portable for that reason. This example shows how to do it the “threaded way”, as it seems quite straightforward and portable through platforms without additional tweaking [1].