34 del sys.modules[moduleName] |
35 del sys.modules[moduleName] |
35 |
36 |
36 self.__modulesToPatch = ( |
37 self.__modulesToPatch = ( |
37 'thread', '_thread', 'threading', |
38 'thread', '_thread', 'threading', |
38 'greenlet', |
39 'greenlet', |
|
40 'subprocess', |
39 'PyQt4.QtCore', 'PyQt5.QtCore', |
41 'PyQt4.QtCore', 'PyQt5.QtCore', |
40 'PySide.QtCore', 'PySide2.QtCore', |
42 'PySide.QtCore', 'PySide2.QtCore', |
41 ) |
43 ) |
42 |
44 |
43 sys.meta_path.insert(0, self) |
45 sys.meta_path.insert(0, self) |
76 not hasattr(module, 'eric6_patched') |
78 not hasattr(module, 'eric6_patched') |
77 ): |
79 ): |
78 if self.__dbgClient.patchGreenlet(module): |
80 if self.__dbgClient.patchGreenlet(module): |
79 module.eric6_patched = True |
81 module.eric6_patched = True |
80 |
82 |
|
83 ## Add hook for subprocess.Popen() |
|
84 elif ( |
|
85 fullname == 'subprocess' and |
|
86 not hasattr(module, 'eric6_patched') |
|
87 ): |
|
88 module.eric6_patched = True |
|
89 patchSubprocess(module, self.__dbgClient) |
|
90 |
81 ## Add hook for *.QThread and *.QProcess |
91 ## Add hook for *.QThread and *.QProcess |
82 elif ( |
92 elif ( |
83 fullname in ('PyQt4.QtCore', 'PyQt5.QtCore', |
93 fullname in ('PyQt4.QtCore', 'PyQt5.QtCore', |
84 'PySide.QtCore', 'PySide2.QtCore') and |
94 'PySide.QtCore', 'PySide2.QtCore') and |
85 not hasattr(module, 'eric6_patched') |
95 not hasattr(module, 'eric6_patched') |