cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Administration & Architecture
Explore discussions on Databricks administration, deployment strategies, and architectural best practices. Connect with administrators and architects to optimize your Databricks environment for performance, scalability, and security.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

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?

1 REPLY 1

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

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group