Files
vaiola/shell/Handlers/GlobalHandler.py
bsakaguchi 817283034a Add civit module
Add civit.fetch function
2025-09-19 18:12:57 +07:00

30 lines
847 B
Python

from shell.Handlers.ABS import Handler
from shell.Handlers.CivitHandler import CivitHandler
from shell.Handlers.PythonappHandler import PythonappHandler
from shell.Handlers.ModelSpaceHandler import ModelSpaceHandler
class GlobalHandler(Handler):
def __init__(self):
super().__init__()
self.forwarding_table: dict[str, Handler] = {
'pythonapp': PythonappHandler(),
'modelspace': ModelSpaceHandler(),
'civit': CivitHandler(),
}
self.handle_table: dict = {
'tell': self._tell
}
def _tell(self, command: list[str], pos = 0):
command_str = ''
for word in command[pos:]: command_str += word + ' '
print(command_str)
self.succeed = True
def _exit(self, command: list[str], pos = 0):
raise KeyboardInterrupt