From 4704a450aaaa9a787f4d1cb60c637ea16005e843 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 1 Aug 2021 19:37:43 -0400 Subject: remove most cmd2 built-in commands By default, support a kind of "kiosk"-mode. --- mm3mod/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm3mod/__init__.py b/mm3mod/__init__.py index 3f22b6d..d43a770 100644 --- a/mm3mod/__init__.py +++ b/mm3mod/__init__.py @@ -11,10 +11,14 @@ class ModShell(cmd2.Cmd): intro = 'Type help or ? for a list of commands' def __init__(self, client, mlist): + super().__init__() self.client = client; self.mlist = mlist; self.prompt = '({:s}) '.format(mlist.list_name) - cmd2.Cmd.__init__(self) + for command in ['shell', 'load', 'pyscript', 'shortcuts', 'alias', + 'edit', 'history', 'py', 'set', 'unalias']: + method='do_{:s}'.format(command) + delattr(cmd2.Cmd,method) def print_held(self): self.held_messages = self.mlist.get_held_page (50,1) -- cgit v1.2.3