From 0da36439a68e7f7716f7967c9437c595fe8b810b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Dausseur?= Date: Tue, 28 Oct 2025 11:37:10 +0100 Subject: [PATCH] management of help functions improved. --- src/appengine/__init__.py | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/appengine/__init__.py b/src/appengine/__init__.py index 81259d8..f4e2bd7 100644 --- a/src/appengine/__init__.py +++ b/src/appengine/__init__.py @@ -175,7 +175,28 @@ class Commands(Thread): if module == "": if method == 'help': - return self.list_modules() + # No argument was given to the help function + if len(args) == 0 and len(kwargs) == 0: + msg = "Type 'help ' to have the list of module's functions.\n" + msg += "Type 'help .' to documentation of a specific function.\n" + success, ret = self.list_modules() + return success, msg + ret + else: + # 1 argument has been provided + if len(args) > 0: + arg = args[0] + else: + arg = list(kwargs.keys())[0] + spl = arg.split(".", 1) + + # help + if len(spl) == 1: + module = arg + # help . + else: + module = spl[0] + args = [spl[1]] + kwargs = {} else: module = self.defmod