()
| 228 | |
| 229 | |
| 230 | def _wait_for_user_input(): |
| 231 | if sys.stdout and sys.stdin and sys.stdin.isatty(): |
| 232 | from debugpy.common import log |
| 233 | |
| 234 | try: |
| 235 | import msvcrt |
| 236 | except ImportError: |
| 237 | can_getch = False |
| 238 | else: |
| 239 | can_getch = True |
| 240 | |
| 241 | if can_getch: |
| 242 | log.debug("msvcrt available - waiting for user input via getch()") |
| 243 | sys.stdout.write("Press any key to continue . . . ") |
| 244 | sys.stdout.flush() |
| 245 | msvcrt.getch() |
| 246 | else: |
| 247 | log.debug("msvcrt not available - waiting for user input via read()") |
| 248 | sys.stdout.write("Press Enter to continue . . . ") |
| 249 | sys.stdout.flush() |
| 250 | sys.stdin.read(1) |
no test coverage detected
searching dependent graphs…