formulahendry / formulahendry/vscode-code-runner
executorMapByFileExtension ignored with Python
- Dominant language
- TypeScript
- Stars
- 2.4k
- Forks
- 351
- PR merge metrics
- No merged PRs in 30d
Description
- VS Code Version: _1.66.0-insider (system setup)_
- OS Version: _Windows 11 Home 21H1_
- Code Runner Version: _v0.11.7_
I often need to run some scripts using _Python2_ due to non updated libraries, so I usually save them using the _.py2_ extension.
I would like code-runner to recognize when it has to launch _Python2_ so that I don't have to edit the settings each time.
```
"code-runner.executorMap": {
"python": "python -u", //this runs Python 3.10
},
"code-runner.executorMapByFileExtension": {
".py2": "python2 -u", //I already set python2 to launch Python 2.7
},
```
I would expect code-runner to execute _python2 -u_ whenever I run a script with the _.py2_ extension, but the _executorMap_ apparently has an higher priority.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.