title: Intelligently launching the default editor from inside a Python CLI program?
body: <p>The answers in <a href="https://stackoverflow.com/questions/1442841">this question</a> didn't get to the heart of the problem. In a CLI-based Python program, I want the user to be able to edit a file and then return to the program. Before returning, I want them to be able to cancel their edits. This should feel like the commit-note-editing feature in Subversion.</p>
  
  <p>What are the current best practices for this type of task?</p>