mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-12 19:47:17 +00:00
15 lines
447 B
Python
15 lines
447 B
Python
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)
|