Latest Development Copy

This commit is contained in:
2025-09-21 10:19:44 -04:00
parent f59b3794ea
commit a480ca0bf3
3 changed files with 150 additions and 12 deletions

View File

@@ -9,12 +9,21 @@ from .libs.terminal import Terminal, ExitTerminal
parser = argparse.ArgumentParser()
_: argparse.Action = parser.add_argument("--debug", help="Debug the program", action="store_true")
_: argparse.Action = parser.add_argument("--remote-debug", help="Enable remote debugging with pudb", action="store_true")
_: argparse.Action = parser.add_argument("--debug-port", help="Port for remote debugging", type=int, default=6899)
args = parser.parse_args()
config: Config = Config()
# stdscr: curses.window = curses.initscr()
def main(stdscr: curses.window) -> None:
terminal: Terminal = Terminal(stdscr)
if args.remote_debug:
import os
from pudb.remote import set_trace
_term_size: os.terminal_size = os.get_terminal_size()
# set_trace(term_size=(_term_size.columns, _term_size.lines), host='0.0.0.0', port=args.debug_port)
terminal: Terminal = Terminal(stdscr, remote_debug=args.remote_debug, debug_port=args.debug_port)
else:
terminal: Terminal = Terminal(stdscr)
Terminal.startup(terminal)
if __name__ == "__main__":