Hi, Guido van Rossum wrote: > The trick seems to be to get the subprocess not to buffer its output > (or input). There's nothing that Python can do for you here! > > Unfortunately, most programs use stdio for all their console I/O, and > stdio automatically buffers its output when connected to a pipe... :-( > > If you absolutely, positively have to do this with a program that > won't unbuffer its output, your only resort would be to use pseudo > ttys -- but that's quite a different story... :-( Yes. But it should be noted here, that sometimes you can avoid the rather complicated and platform depending handling of pseudo ttys, if you use the 'telnetlib' module from the Python standard library. The fine lib documentation contains a good example ready for cut'n'paste. Disadvantage: This only works, if the telnet service is not disabled due to security reasons. Regards, Peter
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4