Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
24
def
rename(old, new):
25
try
:
26
os.rename(old, new)
27
except
:
28
print(
'Could not rename:'
, old)
29
30
if
__name__ ==
'__main__'
:
31
main()
Callers
2
main
Function · 0.70
try_rename
Function · 0.50
Calls
2
print
Function · 0.85
rename
Method · 0.45
Tested by
no test coverage detected