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.

dbgpyapp.py 1.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # dbgpyapp.py - Debugger Python application class
  2. #
  3. import sys
  4. import win32con
  5. import win32ui
  6. from pywin.framework import intpyapp
  7. version = "0.3.0"
  8. class DebuggerPythonApp(intpyapp.InteractivePythonApp):
  9. def LoadMainFrame(self):
  10. "Create the main applications frame"
  11. self.frame = self.CreateMainFrame()
  12. self.SetMainFrame(self.frame)
  13. self.frame.LoadFrame(win32ui.IDR_DEBUGGER, win32con.WS_OVERLAPPEDWINDOW)
  14. self.frame.DragAcceptFiles() # we can accept these.
  15. self.frame.ShowWindow(win32con.SW_HIDE)
  16. self.frame.UpdateWindow()
  17. # but we do rehook, hooking the new code objects.
  18. self.HookCommands()
  19. def InitInstance(self):
  20. # Use a registry path of "Python\Pythonwin Debugger
  21. win32ui.SetAppName(win32ui.LoadString(win32ui.IDR_DEBUGGER))
  22. win32ui.SetRegistryKey("Python %s" % (sys.winver,))
  23. # We _need_ the Scintilla color editor.
  24. # (and we _always_ get it now :-)
  25. numMRU = win32ui.GetProfileVal("Settings", "Recent File List Size", 10)
  26. win32ui.LoadStdProfileSettings(numMRU)
  27. self.LoadMainFrame()
  28. # Display the interactive window if the user wants it.
  29. from pywin.framework import interact
  30. interact.CreateInteractiveWindowUserPreference()
  31. # Load the modules we use internally.
  32. self.LoadSystemModules()
  33. # Load additional module the user may want.
  34. self.LoadUserModules()
  35. # win32ui.CreateDebuggerThread()
  36. win32ui.EnableControlContainer()