def register_topics(self): topics = {} for command in CometPluginCommand.__subclasses__(): tmp = command.topics.copy() topics.update(tmp) for name in topics: self.register_command_topic(topics[name], name) for name in ["q", "EOF", "man"]: self.register_command_topic("shell", name)
from cloudmesh_client.util import path_expand # from cloudmesh_client.shell.command import PluginCommand from cloudmesh_client.shell.command import CometPluginCommand from cloudmesh_client.common.Error import Error class CloudmeshContext(object): def __init__(self, **kwargs): self.__dict__ = kwargs PluginCommandClasses = type( 'CommandProxyClass', tuple(CometPluginCommand.__subclasses__()), {}) """ print (type(PluginCommand.__subclasses__())) # not yet implemented class ConsoleClasses(object): def __init__(self, *command_classes): classes = [] for c in command_classes: classes.append(PluginCommand.__subclasses__()) print (classes)