mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-28 11:40:47 +00:00
threading, readline fixes
This commit is contained in:
parent
e0004335f9
commit
a4937de68a
3 changed files with 13 additions and 7 deletions
|
|
@ -1,8 +1,9 @@
|
|||
import sys
|
||||
from inputimeout import inputimeout, TimeoutOccurred
|
||||
|
||||
def timeout_input(prompt, timeout=10):
|
||||
try:
|
||||
import readline
|
||||
if sys.platform != "win32": import readline
|
||||
user_input = inputimeout(prompt=prompt, timeout=timeout)
|
||||
return user_input
|
||||
except TimeoutOccurred:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue