Christian Convey <[EMAIL PROTECTED]> writes: > I've got a program that (ideally) perpetually monitors sys.stdin for > lines of text. As soon as a line comes in, my program takes some > action. > The problem is, it seems like a very large amount of data must > accumulate on sys.stdin before even my first invocation of readline() > returns. This delay prevents my program from being responsive in the > way it must be.
readline normally returns as soon as it sees a newline. External conditions may cause this to change, or make it impossible. Without knowing those external conditions, the best we can do is guess as to what might be the problem. > Has anyone else seen this effect? If so, is there a reasonable workaround? Yes, and maybe. Depends on what's causing the problem. Tell us more about the program, and what sys.stdin is connected to, and the platform you're running on, and someone should be able to provide explicit information. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list