I'm running a shell execute command in a notebook (Google Collaboratory), and such command prompts me to give a yes/no answer. How can I respond to this prompt shell message within the notebook?
Check to see if you have a notebook configuration file, jupyter_notebook_config.py . The default location for this file is your Jupyter folder located in your home directory: Windows: C:\Users\USERNAME\. jupyter\jupyter_notebook_config.py.
Update: Colab now supports input prompts, so you should see these immediately, e.g.,
Old answer: A typical pattern is to run the command without prompts, if it has such an option. For example, for installation using apt
, provide the option -y
.
If no such option exists, you can do something like piping yes to the program like so: yes | programThatHasConfirmationPrompts
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With