# sysRedirect.py
# Written by Todd Wareham for CS 2500
"""
Given the names of two textfiles Src and Dst as command-line arguments,
 alters sys.stdin to take input from Src and sys.stdout to write to
 Dest.
"""

import sys

sys.stdin = open(sys.argv[1], "r")
sys.stdout = open(sys.argv[2], "w")

print "starting"
line = raw_input()
while line:
    print line
    line = raw_input()
print "finished"

print >> sys.stderr, "This is not an error"
print >> sys.__stdout__, "Neither is this"

