#!/bin/env python """This illustrates how Python handles the streams STDIN, STDOUT, and STDERR. """ import sys # Enumerate lines in STDIN and print them to both STDOUT and STDERR. for line in sys.stdin: print >> sys.stdout, "STDOUT>>%s" % line[:-1] print >> sys.stderr, "STDERR>>%s" % line[:-1]