@@ -0,0 +1,577 @@
+#!/usr/bin/env python%0A%0A# Exercise 17: More Files%0A%0Afrom sys import argv%0Afrom os.path import exists%0A%0Ascript, from_file, to_file = argv%0A%0Aprint %22Copying from %25s to %25s%22 %25 (from_file, to_file)%0A%0A# we could do these two on one line, how?%0Ain_file = open(from_file)%0Aindata = in_file.read()%0A%0Aprint %22The input file is %25d bytes long%22 %25 len(indata)%0A%0Aprint %22Does the output file exist? %25r%22 %25 exists(to_file)%0Aprint %22Ready, hit RETURN to continue, CTRL-C to abort.%22%0Araw_input()%0A%0Aout_file = open(to_file, 'w')%0Aout_file.write(indata)%0A%0Aprint %22Alright, all done.%22%0A%0Aout_file.close()%0Ain_file.close()%0A

add ex17