def InitModule(module_name):
    def get_cmd_name(cls):
        name = cls.__name__
        name = re.sub('(?!^)([A-Z]+)', r'_\1', name).lower()
        # strip "_command"
        return name[0:len(name) - 8]

    module = sys.modules[module_name]
    for name in dir(module):
        if name.startswith("Sbp"):
            cls = getattr(module, name)
            try:
                if not issubclass(cls, SbpTextCommand):
                    continue
            except:
                continue
            # see what the deal is
            name = get_cmd_name(cls)
            cls.jove_cmd_name = name
            if cls.is_kill_cmd:
                kill_cmds.add(name)
            if cls.is_ensure_visible_cmd:
                ensure_visible_cmds.add(name)
dataset/ETHPy150Open grundprinzip/sublemacspro/jove.py/InitModule/original