Many command line utilities do certain things and then wait for user input before proceeding further. I was trying one such utility but inside jupyter notebook. But let me give an example of reading variable command. I typed ! read var
in jupyter notebook cell, it simply hanged awaiting (with * in front of it) for user input:
The utility I am trying to use in jupyter notebook exhibits same behavior. It executes and then simply hangs for user input with no way to provide a user input to it.
Is it possible to give user input to interactive command line tool when used jupyter notebook? And if yes, how?
PS: I want to do this because its great way to document in jupyter notebook (even full command line utility output).
PS: More common use case will be command line utilities that ask for y/n input. But more complex scenario will be: command line tools / scripts that themselves ask for user input "programatically"? By "programatically", I mean, in some environments, they may ask for one input while in other environment, it might ask for different input.