Spaces:
Sleeping
Sleeping
import anvil.server | |
func_reg={} | |
def register(function): | |
global func_reg | |
func={} | |
func['func']=function | |
func['calls']=0 | |
func_reg[function.__name__]=func | |
anvil.server.callable(function) | |
def update_reg(name): | |
global func_reg | |
func_reg[name]['calls']+=1 | |
def get_register(): | |
regstr='' | |
for f in func_reg: | |
regstr+=f + ' called ' + str(func_reg[f]['calls']) + ' times\n' | |
return regstr |