Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fail.py 927B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # NOTE NOTE - This module is designed to fail!
  2. #
  3. # The ONLY purpose for this script is testing/demoing the
  4. # Pythonwin debugger package.
  5. # It does nothing useful, and it even doesnt do that!
  6. import sys
  7. import time
  8. import pywin.debugger
  9. def a():
  10. a = 1
  11. try:
  12. b()
  13. except:
  14. # Break into the debugger with the exception information.
  15. pywin.debugger.post_mortem(sys.exc_info()[2])
  16. a = 1
  17. a = 2
  18. a = 3
  19. a = 4
  20. def b():
  21. b = 1
  22. pywin.debugger.set_trace()
  23. # After importing or running this module, you are likely to be
  24. # sitting at the next line. This is because we explicitely
  25. # broke into the debugger using the "set_trace() function
  26. # "pywin.debugger.brk()" is a shorter alias for this.
  27. c()
  28. def c():
  29. c = 1
  30. d()
  31. def d():
  32. d = 1
  33. e(d)
  34. raise ValueError("Hi")
  35. def e(arg):
  36. e = 1
  37. time.sleep(1)
  38. return e
  39. a()