From b79e9c4350dd03238bb6f550563b1514dc5e11f4 Mon Sep 17 00:00:00 2001 From: Brian Guarraci Date: Sun, 3 Dec 2023 09:09:22 -0700 Subject: [PATCH] fix debug flag --- scripts/kgpy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/kgpy b/scripts/kgpy index 9e83207..ae296c1 100644 --- a/scripts/kgpy +++ b/scripts/kgpy @@ -299,11 +299,14 @@ if __name__ == "__main__": parser.add_argument('-s', '--server', help='start the IPC server', type=str) parser.add_argument('-t', '--test', help='test program from file') parser.add_argument('-v', '--verbose', help='enable verbose output', action="store_true") - parser.add_argument('-d', '--debug', help='enable debug mode', action="store_false") + parser.add_argument('-d', '--debug', help='enable debug mode', action="store_true") parser.add_argument('filename', nargs='?', help='filename to be run if no flags are specified') args = parser.parse_args(main_args[1:]) + if args.debug: + print("args: ", args) + if args.expr: print(KlongInterpreter()(args.expr)) exit() @@ -357,6 +360,9 @@ if __name__ == "__main__": else: run_repl = True + if args.debug: + print("run_repl: ", run_repl) + if run_repl: console_loop = asyncio.new_event_loop() asyncio.set_event_loop(console_loop)