In-place file processing in Python
copied from cf-staging / in_placeThe inplace module provides an InPlace class for reading & writing a file "in-place": data that you write ends up at the same filepath that you read from, and inplace takes care of all the necessary mucking about with temporary files for you.