I am working on an application and there is a library code where it prompts the user by asking a question. The user then provides the answer in the console. The prompt and the user input are both captured using stderr
. Since I cannot access the prompt from the console to the webpage, is there an easy way to perform these steps:
- Capture the prompt from the console inside a Python script
- Provide an input for the prompt from the same script as used in step 1
- Send the user input to the console again from the same script