|
|
@@ -1,6 +1,7 @@ |
|
|
|
from cli import * |
|
|
|
from cli_test import * |
|
|
|
from memory_test import * |
|
|
|
from Controller import * |
|
|
|
#from shell import * |
|
|
|
#import sys |
|
|
|
|
|
|
@@ -20,14 +21,15 @@ print(cli_test_greetUser()) |
|
|
|
#print(cli_test_showHelp_h()) |
|
|
|
#print(cli_test_showHelp_help()) |
|
|
|
|
|
|
|
def printOutput(c): |
|
|
|
if c.recentField.startswith("output")): |
|
|
|
print(getatter(c, c.recentField)) |
|
|
|
|
|
|
|
ctrl = ContextController() |
|
|
|
ctrl.callback(printOutput) |
|
|
|
ctrl = Controller(memory_createContext()) |
|
|
|
ctrl.registerFunction(cli_greetUser) |
|
|
|
ctrl.registerCallback(lambda c: print(f"ИГР App.dbg ctx: '{c}'")) |
|
|
|
|
|
|
|
ctrl.set("didLaunch", True) |
|
|
|
def printOutput(c): |
|
|
|
if c.recentField.startswith("output"): |
|
|
|
print(getattr(c, c.recentField)) |
|
|
|
ctrl.registerCallback(printOutput) |
|
|
|
|
|
|
|
|
|
|
|
# |
|
|
@@ -46,3 +48,5 @@ ctrl.set("didLaunch", True) |
|
|
|
# if c.exit: |
|
|
|
# break |
|
|
|
# print(c.output) |
|
|
|
|
|
|
|
ctrl.set("didLaunch", True) |