Here is a workaround:
def rename_file(old, new): if sys.platform != 'win32': os.rename(new, old) else: os.remove(old) os.rename(new, old)
def rename_file(old, new): if sys.platform != 'win32': os.rename(new, old) else: os.remove(old) os.rename(new, old)