From 8c408791288a2c7b3e62dc8a6133d1402bd4889a Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 3 Dec 2023 02:44:20 +0800 Subject: fixed input bug --- stdlib.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'stdlib.py') diff --git a/stdlib.py b/stdlib.py index f589ea2..7ad8faf 100755 --- a/stdlib.py +++ b/stdlib.py @@ -172,16 +172,16 @@ def ainputf(str: str, end='', ccolor=ascii.color.purple): return input() def input(*arg): - import readline - from builtins import input - input(*arg) + import readline + from builtins import input + return input(*arg) def askinput(str: str, inputter=ainputf, ccolor=ascii.color.blue): return inputter(f"{ccolor}[?] {str}{ascii.color.reset}") def keepasks(info: str, inputter=ainputf, *inputargs): tmprespond = "" - while tmprespond == "" or tmprespond == " " or tmprespond is None: + while tmprespond == "" or tmprespond == " " or tmprespond is None or not tmprespond: tmprespond = inputter(info, *inputargs) return tmprespond -- cgit v1.2.3