Is there an \'out-of-the-box\' way in python to generate a list of differences between two texts, and then applying this diff to one file to obtain the other, later?
Does difflib.unified_diff do want you want? There is an example here.