MCPcopy
hub / github.com/omkarcloud/botasaurus / beep_input

Function beep_input

botasaurus/beep_utils.py:22–36  ·  view source on GitHub ↗
(prompt, should_beep=True)

Source from the content-addressed store, hash-verified

20 return _is_multiprocessing
21
22def beep_input(prompt, should_beep=True):
23 if should_beep:
24 play_beep()
25 if is_multiprocessing():
26 print(prompt)
27 print("Prompting is disabled in multiprocessing mode. Therefore Returning None.")
28 return None
29 else:
30 try:
31 user_input = input(prompt)
32 return user_input
33 except EOFError:
34 print("Input stream closed unexpectedly.")
35 # You can choose to return a default value or raise a custom exception here
36 return None # or raise CustomInputError("Input stream closed unexpectedly.")
37
38def prompt( text="Press Enter To Continue...", should_beep = True):
39 return beep_input(text, should_beep)

Callers 3

run_taskFunction · 0.85
run_taskFunction · 0.85
promptFunction · 0.85

Calls 2

play_beepFunction · 0.85
is_multiprocessingFunction · 0.85

Tested by

no test coverage detected