From 74e62a2b0d2dddb01fc359be936c7ae31994bc73 Mon Sep 17 00:00:00 2001 From: ElectronixTM Date: Sun, 16 Mar 2025 04:00:42 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=B2=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE=20=D0=B2=D1=8B=D1=85=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=BF=D0=BE=20EOF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interactive.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/interactive.py b/src/interactive.py index a8b2143..7f5973c 100644 --- a/src/interactive.py +++ b/src/interactive.py @@ -15,7 +15,10 @@ def interactve_mode(rulebook: Rulebook): print("To get help type \"h:\" in prompt") _print_rules(rulebook.rules) while True: - user_input = input("#> ") + try: + user_input = input("#> ") + except EOFError: + return if user_input.startswith("h:"): print_help() elif user_input.startswith("r:"):