I'm following Zed A. Shaw's lpthw example 17 if you want to look at it https://learnpythonthehardway.org/book/ex17.html and it works just with only one line but not multiple (using terminal, windows powershell)
the original file says
"This is a test you are being tested why does it not work on multiple lines the 2nd line says see but capitalized
SEE"
the 2nd file that copied the text and pasted it using write command says this
"This is a test you are being tested why does it not work on multiple lines the 2nd line says see but capitalized
ऀ匀䔀䔀" I don't understand it i even copied his code and there isn't a single change in his or mine yet neither
from sys import argv
from os.path import exists
script, from_file, to_file = argv
print "Copying from %s to %s" % (from_file, to_file)
# we could do these two on one line, how?
in_file = open(from_file)
indata = in_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()
out_file = open(to_file, 'w')
out_file.write(indata)
print "Alright, all done."
out_file.close()
in_file.close()`
I don't want to change the code much just because I know this works for a single line and beleive without much change it can work with an entire essay for example