python's output redirect [python's output redirect] fin = open("xx.txt", 'r'); print >>fin, "hello world", 12; fin.close();