OK, it was really a newbie thing: import sys while True: line = sys.stdin.readline() process(line) sorry. -- --arutz