Sep-09-2019, 08:34 AM
(Sep-09-2019, 05:40 AM)snippsat Wrote: Yes,with that option it will always run with Python interpreter that's active
Thanks for your kind confirmation.
Some points encountered during implementation of suggested course of action are placed below, for ready reference:
In my case, the file path involves a space (i.e. Program Files). As a result, insertion of generic statement (shown below) into json file attracts error:
"code-runner.executorMap": {"python": "$pythonPath $fullFileName"}As a remedial measure, if hard string (with enclosing escape characters) is entered as shown below, there is no problem:
"code-runner.executorMap": {"python": "\"C:\\Program Files\\Python37\\python.exe\""}However, such hard wiring of path would have the drawback of losing the flexibility provided by the generic statement as per your original suggestion i.e.:
"code-runner.executorMap": {"python": "$pythonPath $fullFileName"}It would be great if a way could be found to make a success of generic statement, even for file paths having empty spaces.
In absence of such solution, might it not be preferable to avoid making any entry at all in json file. That way, the default python interpreter, as selected by the user, would prevail.
A.D.Tejpal