formulahendry / formulahendry/vscode-code-runner

wsl terminal args issue when it use python interpreter on windows.

Aperta
#282 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

enhancement
Lingua principale
TypeScript
Stelle
2.4k
Fork
352
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I am using wsl as vscode default terminal. but I want execute my python script using window python interpreter.
```python
{
...
"code-runner.executorMap": {
"python": "/mnt/c/Python27_64/python.exe -u",
},
"code-runner.runInTerminal": true,
...
}
```
above is my custom option to do what I want. but I got argument error.
```
root@local:~/home/test# /mnt/c/Python27_64/python.exe -u "/mnt/c/Users/user/home/test.py"
C:\Python27_64\python.exe: can't open file '/mnt/c/Users/user/home/test.py': [Errno 2] No such file or directory
```
windows python interpreter use windows path form for the script which passed first argument. so if I change command line by hand then it works.
```
root@local:~/home/test# /mnt/c/Python27_64/python.exe -u "c\\Users\\user\\home\\test.py"
```
It would be great if there is way to change wsl path to window path form. how can I do that? or where can I hook code runner's process? and I think it would be nice if code runner support contrary case.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Start by reproducing the command from the reported executorMap with runInTerminal enabled, using a WSL terminal and a Windows Python interpreter. Trace how Code Runner launches the script and handles its path; done means the Windows interpreter receives a usable Windows-form path, with the requested reverse case considered as well.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.