Introduction
You will need to run the script from the command line (terminal) instead of direct Visual Studio code if you want to interact with the program as a regular user.
> python name_of_program.py
Development
The output displayed inside Visual Studio code is not intended to interact with the base script, and it does not have the ability to read any data directly from your keyboard (it simply shows the output of what you decided to run).
Bypass
What you can do is edit your task file to automatically create the selected terminal, and not directly run python -interpreter.
Depending on which operating system you are in and the available terminals, the changes necessary for this may look a little different, but they should all follow the same pattern.
{ "version": "0.1.0", "command": "urxvt", "isShellCommand": false, "showOutput": "always", "args": [ "-e", "python ${file}" ] }
NOTE
In the above example, urxvt is the name of my choice for the terminal, -e is the flag needed to pass the command that should be executed at startup, and python ${file} is the command to execute.
My recommendation is to get the command necessary to launch a new terminal, and directly execute the python script, working elsewhere, before editing the problem file.
source share