(prompt, should_beep=True)
| 20 | return _is_multiprocessing |
| 21 | |
| 22 | def 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 | |
| 38 | def prompt( text="Press Enter To Continue...", should_beep = True): |
| 39 | return beep_input(text, should_beep) |
no test coverage detected