fix: добавил возможность корректного выхода по EOF

This commit is contained in:
ElectronixTM
2025-03-16 04:00:42 +03:00
parent 2604331c7a
commit 74e62a2b0d

View File

@ -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:"):