MCPcopy Create free account
hub / github.com/ActiveState/code / recipe-578621.py

File recipe-578621.py

recipes/Python/578621_Self_Counter/recipe-578621.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1import os, sys
2this = int(os.path.splitext(os.path.basename(sys.argv[0]))[0])
3os.rename(str(this) + '.py', str(this + 1) + '.py')
4os.startfile(str(this + 1) + '.py')

Callers

nothing calls this directly

Calls 2

strFunction · 0.85
renameMethod · 0.45

Tested by

no test coverage detected