src/eric7/Debugger/DebugServer.py

branch
eric7
changeset 9485
0f3620304d7a
parent 9483
1208b0ef8ccb
child 9497
8beca4047c53
equal deleted inserted replaced
9484:d2eb8f0a5bf0 9485:0f3620304d7a
6 """ 6 """
7 Module implementing the debug server. 7 Module implementing the debug server.
8 """ 8 """
9 9
10 import contextlib 10 import contextlib
11 import importlib
11 import os 12 import os
12 import shlex 13 import shlex
13 14
14 from PyQt6.QtCore import QModelIndex, pyqtSignal, pyqtSlot 15 from PyQt6.QtCore import QModelIndex, pyqtSignal, pyqtSlot
15 from PyQt6.QtNetwork import QHostAddress, QHostInfo, QNetworkInterface, QTcpServer 16 from PyQt6.QtNetwork import QHostAddress, QHostInfo, QNetworkInterface, QTcpServer
396 def __registerDebuggerInterfaces(self): 397 def __registerDebuggerInterfaces(self):
397 """ 398 """
398 Private method to register the available internal debugger interfaces. 399 Private method to register the available internal debugger interfaces.
399 """ 400 """
400 for name, interface in DebuggerInterfaces.items(): 401 for name, interface in DebuggerInterfaces.items():
401 modName = "eric7.Debugger.{0}".format(interface) 402 mod = importlib.import_module("eric7.Debugger.{0}".format(interface))
402 mod = __import__(modName)
403 components = modName.split(".")
404 for comp in components[1:]:
405 mod = getattr(mod, comp)
406
407 self.registerDebuggerInterface(name, mod.getRegistryData) 403 self.registerDebuggerInterface(name, mod.getRegistryData)
408 404
409 def getSupportedLanguages(self, shellOnly=False): 405 def getSupportedLanguages(self, shellOnly=False):
410 """ 406 """
411 Public slot to return the supported programming languages. 407 Public slot to return the supported programming languages.

eric ide

mercurial