diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2023-12-03 02:44:20 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2023-12-03 02:44:20 +0800 |
| commit | 8c408791288a2c7b3e62dc8a6133d1402bd4889a (patch) | |
| tree | 9f15d9900bd5122365e48907a7c0efedc6812dd0 /stdlib.py | |
| parent | fb2a230b6fb432773faa726128028fd721eec563 (diff) | |
fixed input bug
Diffstat (limited to 'stdlib.py')
| -rwxr-xr-x | stdlib.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |
