def list_commands(self, *path):
        path_str = ':'.join(path)

        commands = []
        for command in self.commands.keys():

            # Filter based on prefix and the segment length
            if all([command.startswith(path_str),
                    len(path) == command.count(":")]):

                # offset is used to exclude the path that the caller requested.
                offset = len(path_str) + 1 if path_str else 0
                commands.append(command[offset:])

        return sorted(commands)
Command listing.
dataset/ETHPy150Open softlayer/softlayer-python/SoftLayer/CLI/environment.py/Environment.list_commands