title: Generating and applying diffs in python
body: <p>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? </p>
  
  <p>I want to keep the revision history of a text, but I don't want to save the entire text for each revision if there is just a single edited line. I looked at <a href="http://docs.python.org/library/difflib.html" rel="noreferrer">difflib</a>, but I couldn't see how to generate a list of just the edited lines that can still be used to modify one text to obtain the other.</p>