in fbchisellldb.py [0:0]
def loadCommandsInDirectory(commandsDirectory):
for file in os.listdir(commandsDirectory):
fileName, fileExtension = os.path.splitext(file)
if fileExtension == ".py":
module = imp.load_source(fileName, os.path.join(commandsDirectory, file))
if hasattr(module, "lldbinit"):
module.lldbinit()
if hasattr(module, "lldbcommands"):
module._loadedFunctions = {}
for command in module.lldbcommands():
loadCommand(
module, command, commandsDirectory, fileName, fileExtension
)