-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathex17.py
More file actions
29 lines (20 loc) · 698 Bytes
/
Copy pathex17.py
File metadata and controls
29 lines (20 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from sys import argv
from os.path import exists
script, from_file, to_file = argv
#we could do these two on one line too, how?
#in_file = open(from_file)
#indata = in_file.read()
#indata = open(from_file).read()
#print "The input file is %d bytes long" % len(indata)
#print "does the output file exist? %r" % exists(to_file)
#print "Ready, hit RETURN to continue, CTRL-C to abort."
#raw_input()
print "Whether the output file exists: %r" % exists(to_file)
print "Copying from %s to %s" % (from_file, to_file)
#out_file = open(to_file, 'w')
#out_file.write(indata)
open(to_file, 'w').write(open(from_file).read())
#print "Alright, all done."
print "Done"
#out_file.close()
#in_file.close()