I want to change a.txt to b.kml.
a.txt
b.kml
os.rename(old, new)
This is found in the Python docs: http://docs.python.org/library/os.html