#ex17.py
from sys import argv
from os.path import exists
script, from_file, to_file = argv
print(f"Copying from {from_file} to {to_file}")
in_file = open(from_file)
indata = in_file.read()
print(f"The input file is {len(indata)} bytes long")
exists(to_file)
out_file = open(to_file, 'w')
out_file.write(indata)
out_file.close()
in_file.close()
#ex17_2.py
from sys import argv
from os.path import exists
script, from_file, to_file = argv
indata = open(from_file).read()
exists(to_file)
open(to_file, 'w').write()