示例#1
0
文件: test_debug.py 项目: njues/Sypy
 def f(x):
     debug_start("mycat")
     debug_print("foo", 2, "bar", x)
     debug_stop("mycat")
     debug_flush() # does nothing
     debug_offset() # should not explode at least
     return have_debug_prints()
示例#2
0
 def entry_point(argv):
     x = "got:"
     debug_start  ("mycat")
     if have_debug_prints(): x += "b"
     debug_print    ("foo", r_longlong(2), "bar", 3)
     debug_start      ("cat2")
     if have_debug_prints(): x += "c"
     debug_print        ("baz")
     debug_stop       ("cat2")
     if have_debug_prints(): x += "d"
     debug_print    ("bok")
     debug_stop   ("mycat")
     if have_debug_prints(): x += "a"
     debug_print("toplevel")
     debug_flush()
     os.write(1, x + "." + str(debug_offset()) + '.\n')
     return 0
示例#3
0
 def entry_point(argv):
     x = "got:"
     debug_start  ("mycat")
     if have_debug_prints(): x += "b"
     debug_print    ("foo", r_longlong(2), "bar", 3)
     debug_start      ("cat2")
     if have_debug_prints(): x += "c"
     debug_print        ("baz")
     debug_stop       ("cat2")
     if have_debug_prints(): x += "d"
     debug_print    ("bok")
     debug_stop   ("mycat")
     if have_debug_prints(): x += "a"
     debug_print("toplevel")
     debug_flush()
     os.write(1, x + "." + str(debug_offset()) + '.\n')
     return 0