> def process (input, output): > for line in input: > ... > output.write(line) > > if __name__ == '__main__': > import sys > # (Or process command-line arguments to specify files...) > process(sys.stdin, sys.stdout) Hmm, do we have an old Pascal programmer in our midst? program(input, output) begin readln(input); writeln(output) end. ;-) Alan G.