Python User Input During Run-time

kevindenham
New Contributor

I'm new to Advana and was putting together a Python script that requires user interactions during run-time. However, the program pauses at an 'input()' command without a console cell to accept responses. Am I missing something about this instance of Jupiter Notebook?

Walter_C
Databricks Employee
Databricks Employee

This is a common issue because Jupyter Notebooks are not designed to handle interactive input in the same way as a standard Python script run in a terminal.

In Jupyter Notebooks, the input() function does not work as expected because the notebook interface does not support interactive command-line input. Instead, you can use Jupyter's built-in widgets to create interactive elements that can capture user input.

https://docs.databricks.com/en/notebooks/ipywidgets.html