Python Forum
Code Runner In VS-Code - Problem With User Input
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Code Runner In VS-Code - Problem With User Input
#6
(Sep-10-2019, 01:03 PM)snippsat Wrote: Search setting code-runner.runInTerminal

Thanks for your kind observation. I had experimented with setting the runInTerminal property of code-runner to true,and there was no problem.

However, as explained in my post, I was trying to explore the feasibility of running user interaction code on output pane as its quality appears to be better than that on terminal pane.

On exploring the internet, there are quite a few postings raising this problem. the work-around suggested therein so far is the same as advised by you, i.e. running the code in terminal pane.

Perhaps the hitch might lie in the design of VS-Code itself, wherein the output pane has intentionally been kept immune from user interaction.

Results of some tests conducted at my end are placed below, for ready reference:

T-01:
Right Click > Run In Terminal:
Same results with Code Runner installed or Not.
Term Pane Name: Python , Output Pane: blank
Usual terminal clutter is present before commencement of output.

T-02:
Code Runner Installed and its runInTerminal property is set to true:
Press Ctrl+Alt+N for running the code:
Term Pane Name: Code , Output Pane: Blank
Usual terminal clutter is present before commencement of output.

T-03:
Code Runner Installed and its runInTerminal property is set to false:
Press Ctrl+Alt+N for running the code:
Output Pane Name: Code , Termial Pane: Cmd
Very neat output on the output pane.

T-04:
Default task named RunPython set via tasks.json
Same results whether Code Runner installed or Not
Press Ctrl+Shift+B for running the code.
Term Pane Name: Task-RunPython , Output Pane: Blank
In this case, the output of terminal pane is observed to be neatest as compared to other terminal based alternatives.

Conclusion:
If it is felt necessary to run code in terminal, doing so via a set task (Ref T-04 above), provides neatest output, almost matching output pane mode of Code Runner. This alternative works even if Code Runner is not installed.
A.D.Tejpal
Reply


Messages In This Thread
RE: Code Runner In VS-Code - Problem With User Input - by adt - Sep-10-2019, 04:59 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Convert Python code to MATLAB code bitoded 4 5,042 Dec-30-2022, 02:06 AM
Last Post: Larz60+
  looking for code that substitues parts of python code Skaperen 0 1,208 Jul-07-2022, 11:34 PM
Last Post: Skaperen
  Problem with VS code and Anaconda angelica 2 2,659 Feb-15-2021, 06:57 PM
Last Post: bishwasbh
  visual studio code python how to get source code of import module definitian umen 2 4,018 Jun-13-2020, 06:20 PM
Last Post: umen
  How to Rewrite MATLAB code to Python code Roc_Wizard 1 2,788 Jul-21-2018, 05:32 PM
Last Post: Larz60+
  Recovering lost source code when the code is running in memory micseydel 13 9,810 Apr-14-2017, 02:35 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020