(msg)
| 30 | from __future__ import division |
| 31 | VERSION = '5.0' |
| 32 | def debug_msg(msg): |
| 33 | if DEBUG: |
| 34 | if isinstance(msg, Exception): |
| 35 | exc_type, exc_obj, exc_tb = sys.exc_info() |
| 36 | fname = os.path.split(exc_tb.tb_frame.f_code.co_filename)[1] |
| 37 | print('debug: %s Line %i' % (str(msg), exc_tb.tb_lineno)) |
| 38 | else: |
| 39 | print('debug: %s' % str(msg)) |
| 40 | def error_msg(msg, e = None): |
| 41 | if DEBUG and e: |
| 42 | exc_type, exc_obj, exc_tb = sys.exc_info() |
no outgoing calls