1 2 3 4 5 6 7 8 9
import sys if __name__ == "__main__": file_path = sys.argv[1] with open(file_path, "a") as f: for text in sys.argv[2:]: print >>f, text