codekingpro/portable-devtools
115k
1# NOTE NOTE - This module is designed to fail!2#3# The ONLY purpose for this script is testing/demoing the4# Pythonwin debugger package.5 6# It does nothing useful, and it even doesnt do that!7 8import sys9import time10 11import pywin.debugger12 13 14def a():15 a = 116 try:17 b()18 except:19 # Break into the debugger with the exception information.20 pywin.debugger.post_mortem(sys.exc_info()[2])21 a = 122 a = 223 a = 324 a = 425 26 27def b():28 b = 129 pywin.debugger.set_trace()30 # After importing or running this module, you are likely to be31 # sitting at the next line. This is because we explicitely32 # broke into the debugger using the "set_trace() function33 # "pywin.debugger.brk()" is a shorter alias for this.34 c()35 36 37def c():38 c = 139 d()40 41 42def d():43 d = 144 e(d)45 raise ValueError("Hi")46 47 48def e(arg):49 e = 150 time.sleep(1)51 return e52 53 54a()55 