25 @type DebugClient |
25 @type DebugClient |
26 """ |
26 """ |
27 self.__dbgClient = debugClient |
27 self.__dbgClient = debugClient |
28 |
28 |
29 self.__enableImportHooks = True |
29 self.__enableImportHooks = True |
30 |
|
31 # TODO: check if needed |
|
32 if sys.version_info[0] == 2: |
|
33 self.threadModName = 'thread' |
|
34 else: |
|
35 self.threadModName = '_thread' |
|
36 |
30 |
37 # reset already imported thread module to apply hooks at next import |
31 # reset already imported thread module to apply hooks at next import |
38 for moduleName in ("thread", "_thread", "threading"): |
32 for moduleName in ("thread", "_thread", "threading"): |
39 if moduleName in sys.modules: |
33 if moduleName in sys.modules: |
40 del sys.modules[moduleName] |
34 del sys.modules[moduleName] |