maybe 'w' is enough? FYI: http://docs.python.org/2/tutorial/inputoutput.html#reading-and-writing-files