{"library":"blessed","code":"from blessed import Terminal\nimport os\n\nterm = Terminal()\nprint(term.home + term.clear + term.move_y(term.height // 2))\nprint(term.black_on_darkkhaki(term.center('press any key to continue.')))\n\nwith term.cbreak(), term.hidden_cursor():\n    # Use os.environ.get for auth keys in real applications if needed\n    inp = term.inkey(timeout=os.environ.get('BLESSED_INKEY_TIMEOUT', 3))\n\nprint(term.move_down(2) + 'You pressed ' + term.bold(repr(inp)))\nprint(term.normal + 'Exiting.')","lang":"python","description":"This example initializes the terminal, clears the screen, centers a styled message, waits for a single key press using a context manager for `cbreak` mode and a hidden cursor, then prints the pressed key before exiting. The `timeout` for `inkey` uses an environment variable fallback for robustness.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}