mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-02 21:50:34 +00:00
BIG PYTHON REFACTOR
Python scripts moved out of python/ folder to root to be unified with plugins + frontend extension around api calls
This commit is contained in:
parent
f94b7d742c
commit
d02dda3667
326 changed files with 1096 additions and 862 deletions
10
helpers/timed_input.py
Normal file
10
helpers/timed_input.py
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import sys
|
||||
from inputimeout import inputimeout, TimeoutOccurred
|
||||
|
||||
def timeout_input(prompt, timeout=10):
|
||||
try:
|
||||
if sys.platform != "win32": import readline
|
||||
user_input = inputimeout(prompt=prompt, timeout=timeout)
|
||||
return user_input
|
||||
except TimeoutOccurred:
|
||||
return ""
|
||||
Loading…
Add table
Add a link
Reference in a new issue