eric7/DebugClients/Python/ModuleLoader.py

branch
eric7
changeset 8831
9d676f442b1b
parent 8314
e3642a6a1e71
child 8881
54e42bc2437a
equal deleted inserted replaced
8830:3bbdfb81b2c3 8831:9d676f442b1b
34 for moduleName in ("thread", "_thread", "threading"): 34 for moduleName in ("thread", "_thread", "threading"):
35 if moduleName in sys.modules: 35 if moduleName in sys.modules:
36 del sys.modules[moduleName] 36 del sys.modules[moduleName]
37 37
38 self.__modulesToPatch = ( 38 self.__modulesToPatch = (
39 'thread', '_thread', 'threading', 39 '_thread', 'threading',
40 'greenlet', 40 'greenlet',
41 'subprocess', 41 'subprocess',
42 'multiprocessing', 42 'multiprocessing',
43 'PyQt5.QtCore', 43 'PyQt5.QtCore',
44 'PyQt6.QtCore', 44 'PyQt6.QtCore',
60 module = importlib.import_module(fullname) 60 module = importlib.import_module(fullname)
61 sys.modules[fullname] = module 61 sys.modules[fullname] = module
62 62
63 ## Add hook for _thread.start_new_thread 63 ## Add hook for _thread.start_new_thread
64 if ( 64 if (
65 fullname in ('thread', '_thread') and 65 fullname == '_thread' and
66 not hasattr(module, 'eric7_patched') 66 not hasattr(module, 'eric7_patched')
67 ): 67 ):
68 module.eric7_patched = True 68 module.eric7_patched = True
69 self.__dbgClient.patchPyThread(module) 69 self.__dbgClient.patchPyThread(module)
70 70

eric ide

mercurial