Robert Latest <[EMAIL PROTECTED]> writes: >> If you see lines one by one, you are in luck, and you can fix things >> on the Python level simply by avoiding buffering in popen. If not, >> you will need to resort to more advanced hackery (e.g. fixing stdio >> using LD_PRELOAD). > > Do I really? After all, the shell itself doesn't hack stdio, does > it?
Have you tried the "./slow | cat" test? It's not about the shell doing anything special, it's about slow's stdio choosing buffering "appropriate" for the output device. The hackery I referred to would be necessary to force slow's stdio to use line buffering over file/pipe output simply because there is no documented way to do that (that I know of). > Anyway, I'm taking this over to comp.unix.programmer since it really > isn't a python problem. It's still an often-encountered problem, so I believe a summary of the solution(s) would be appreciated. -- http://mail.python.org/mailman/listinfo/python-list