title: making undo in python
body: <p>first of all .. sorry if my english was bad. its my 3rd language
  <br>
  im working on a paint software that draw over images and save them again ( for commenting propose )  <br> i use pile and wxpython.
  but im still having problems with some features .. <br>
  what is the ideal way to make the undo option ? <br>
  another question .. when the user scale the picture ( by enlarging the drawing frame) 
  the lines doesn't scale . how do i make that happen .<br></p>
  
  <p>i got rid of all those problems  by saving temporary images to the hard disk whenever the user finishes a line and assign that new picture ( the old one with a line on it)  to the frame . 
  undo and redo will is done by switching between those images ...
  so when user scale image the line will scale  too . but that is bad since it takes a lot of  HDD space ( when you draw 1000 lines ) and its slow because it assigns a new image every time a user draw a line  <br></p>
  
  <p>hope my idea is clear</p>
  
  <p>does anyone have a better solution ?</p>