{"library":"questionary","code":"import questionary\n\ndef main():\n    name = questionary.text(\"What's your name?\").ask()\n    if name is None: # User pressed Ctrl+C\n        print(\"Operation cancelled.\")\n        return\n\n    choice = questionary.select(\n        \"What do you want to do?\",\n        choices=['Order a pizza', 'Make a reservation', 'Ask for opening hours']\n    ).ask()\n    if choice is None:\n        print(\"Operation cancelled.\")\n        return\n\n    print(f\"Hello, {name}!\")\n    print(f\"You chose: {choice}\")\n\nif __name__ == \"__main__\":\n    main()","lang":"python","description":"This quickstart demonstrates how to use `questionary.text` for free-form input and `questionary.select` for choosing from a list. It also includes basic handling for `Ctrl+C` which causes `ask()` to return `None`.","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}]}