Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #I want this code to write to the first file and then take the
- #contents of the first file and copy them to the second.
- from sys import argv
- script, file1, file2 = argv
- def write_to_file(fileread, filewrite):
- '''Writes to a file '''
- filewrite.write(fileread)
- input_file = open(file1, 'r+w')
- output_file = open(file2, 'w')
- datain = raw_input(">")
- input_file.write(datain)
- print input_file.read()
- write_to_file(input_file.read(), output_file)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement