On Wed, Aug 27, 2014 at 4:37 PM, Steven D'Aprano <st...@pearwood.info> wrote:
> On Wed, 27 Aug 2014 08:29:20 +0300, Marko Rauhamaa wrote:
>
>> Try flushing after each print.
>
> Doesn't help.

It does, but insufficiently. If slurp.py is run under Py3, it works
fine; or take Naoki's suggestion (although without the parens):

import sys
import time

for line in iter(sys.stdin.readline, ''):
        print "Time of input:", time.ctime(), line
        sys.stdin.flush()
        sys.stdout.flush()

Then it works.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to