Skip to content

Instantly share code, notes, and snippets.

@Dliv3
Last active November 19, 2020 15:20
Show Gist options
  • Save Dliv3/59c136f5e0bcd8e09b17319faeb44c30 to your computer and use it in GitHub Desktop.
Save Dliv3/59c136f5e0bcd8e09b17319faeb44c30 to your computer and use it in GitHub Desktop.
dlive python debugging decorator
def dliveDebugStr(string):
print('\033[32m[DLIVE DEBUG] >>> {}\033[0m'.format(string))
def dliveDebugFunc(func):
def wrapper(*args, **kw):
dliveDebugStr('{}.{}'.format(args[0].__class__.__name__, func.__name__))
# for each in args:
# dliveDebugStr('| -- {}'.format(each))
# for i in kw:
# dliveDebugStr('| -- {} => {}'.format(i, kw[i]))
return func(*args, **kw)
return wrapper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment