title: Best way to have a python script copy itself?
body: <p>I am using python for scientific applications. I run simulations with various parameters, my script outputs the data to an appropriate directory for that parameter set. Later I use that data. However sometimes I edit my script; in order to be able to reproduce my results if needed I would like to have a copy of whatever version of the script was used to generate the data live right in the directory with the data. So basically I would like to have my python script copy itself to the data directory. What's the best way to do this?</p>
  
  <p>Thanks!</p>