read from source file one line at a time and write to target file one line at time.
def fileCopy(source, target): sourceFile = open(source, 'r') targetFile = open(target, 'w') for line in sourceFile: targetFile.write(line) targetFile.close() sourceFile.close()