Python 3.x required. All libraries used in the code are built into Python
The debug variable can take the values โโTrue or False
from DEBUG.DEBUG import DEBUG
try:
...
except Exception as e:
if DEBUG:
print(e)
A decorator that measures the duration of a program and returns it
from DEBUG.DEBUG import _timer
# time is built-in function
import time
@_timer
def test():
time.sleep(5)
f = test
print(f())
# output: 0:00:05.004447