您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

123456789101112131415
  1. #!/usr/bin/env python3
  2. from traceback import print_exception
  3. show_debug_messages = False
  4. def debug_print(what, force: bool = False):
  5. if not force and not show_debug_messages:
  6. return
  7. if isinstance(what, Exception):
  8. print_exception(type(what), value=what, tb=None)
  9. else:
  10. print("[DEBUG] %s" % what)