diff -r 27f56dc07b5b -r 71c51aae2f4e DebugClients/Python/ThreadExtension.py --- a/DebugClients/Python/ThreadExtension.py Fri Oct 14 23:02:38 2016 +0200 +++ b/DebugClients/Python/ThreadExtension.py Sat Oct 15 20:36:37 2016 +0200 @@ -9,6 +9,7 @@ import os.path import sys +import importlib if sys.version_info[0] == 2: import thread as _thread @@ -269,7 +270,7 @@ @return reference to the loaded module @rtype module """ - module = __import__(fullname) + module = importlib.import_module(fullname) sys.modules[fullname] = module if (fullname == self.threadModName and self._original_start_new_thread is None): @@ -278,12 +279,12 @@ module.start_new_thread = self.attachThread elif fullname in ['PyQt4.QtCore', 'PyQt5.QtCore', 'PySide.QtCore'] and self._qtThread is None: - self._qtThread = module.QtCore.QThread + self._qtThread = module.QThread # _debugClient as a class attribute can't be accessed in following # class. Therefore we need a global variable. _debugClient = self - class QThreadWrapper(module.QtCore.QThread): + class QThreadWrapper(module.QThread): __qtThreadNumber = 1 def __init__(self, *args, **kwargs):