0

Im currently running a python code with code runner in VScode, but when I try to run a file that asks the user for a input, the code autofills the input with a path string like pyenv shell 3.11.3 or python -u "file path". Its really annoying . There is any workaround this?

thank you

I tried to modify code runner settings but it didn't work, at least from the solutions that I saw.

Ikaro
  • 35
  • 3
  • so what do you want to happen? what _exactly_ are you seeing? how does your program ask for input? on the commandline? in the input stream? – starball Aug 19 '23 at 21:58

1 Answers1

0

See Code Runner expansion plan: First, make sure you have checked the settings of the Code Runner extension in VSCode to see if there is an option for input autofill or default input behavior. Go to File > Preferences > Settings and search for "Code Runner". Find any suitable program that can control input behavior.

Enter Rule Runner for Python: If you can’t find a direct setting to disable input autofill, you may want to configure Code Runner specifically for Python scripts. In your VSCode configuration you can set the following settings.

"code-runner.executormap": { "python": "nature3 -u", } .

The -u flag in the configuration disables buffering for standard input/output streams, which can help solve the input autofill problem.