Source code for tokio.debug

#!/usr/bin/env python

import sys

DEBUG = False

[docs]def debug_print(string): """ Print debug messages if the module's global debug flag is enabled. """ if DEBUG: sys.stderr.write(string + "\n") return
[docs]def error(string): """ Handle errors generated within TOKIO. Currently just a passthrough to stderr; should probably provide exceptions later on. """ sys.stderr.write(string + "\n")
[docs]def warning(string): """ Handle warnings generated within TOKIO. Currently just a passthrough to stderr; should probably provide a more rigorous logging/reporting interface later on. """ sys.stderr.write(string + "\n")