from tfw.components import TerminalCommands from tfw.networking import Scope from .event_handler import EventHandler class TerminalCommandsEventHandler(EventHandler, TerminalCommands): def __init__(self, key, scope=Scope.ZMQ, bashrc=None): EventHandler.__init__(self, key, scope) TerminalCommands.__init__(self, bashrc) def handle_event(self, message): command = message['value'] self.callback(command)