mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Remove unsupported arguments for Python <3.7
This commit is contained in:
parent
ec82b4f994
commit
f4c583664a
1 changed files with 3 additions and 1 deletions
|
|
@ -61,7 +61,9 @@ class Str(str):
|
||||||
|
|
||||||
|
|
||||||
async def ainput(prompt: str = ""):
|
async def ainput(prompt: str = ""):
|
||||||
with ThreadPoolExecutor(1, "AsyncInput", lambda x: print(x, end="", flush=True), (prompt,)) as executor:
|
print(prompt, end="", flush=True)
|
||||||
|
|
||||||
|
with ThreadPoolExecutor(1, "AsyncInput") as executor:
|
||||||
return (await asyncio.get_event_loop().run_in_executor(
|
return (await asyncio.get_event_loop().run_in_executor(
|
||||||
executor, sys.stdin.readline
|
executor, sys.stdin.readline
|
||||||
)).rstrip()
|
)).rstrip()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue