> def file_copy(source, dest): > in_file = open(source, 'r') > out_file = open(dest, 'w') Try: in_file = open( source, 'rb' ) out_file = open( dest, 'wb' ) This way, you're always opening the file in _binary_ mode instead of the default, text mode. I suspect that your reads are stopping at end-of-line characters.