MCPcopy Create free account
hub / github.com/ActiveState/code / rename

Function rename

recipes/Python/577342_AutoRenamepy/recipe-577342.py:24–28  ·  view source on GitHub ↗
(old, new)

Source from the content-addressed store, hash-verified

22 rename(old_name, new_name)
23
24def rename(old, new):
25 try:
26 os.rename(old, new)
27 except:
28 print('Could not rename:', old)
29
30if __name__ == '__main__':
31 main()

Callers 2

mainFunction · 0.70
try_renameFunction · 0.50

Calls 2

printFunction · 0.85
renameMethod · 0.45

Tested by

no test coverage detected