remove quote mark in $dir
When a python project is beyond simple, the import statement can be very complex, such as from py_c.c_api import sample . If PYTHONPATH is not set, there may cause ImportError.
So, Pycharm put ${fileDir} and ${WorkSpaceRoot} in PYTHONPATH before run *.py file.
For this simple file tree:
D:/proj/ --------foo/ -------------foo.py
I guess the command line what pycharm use is: "cd D:/pro/ && set PYTHONPATH=D:/pro/;D:/pro/foo/&& C:/Python27/python.exe D:/pro/foo/foo.py"
I use these manner to run a python project in code-runner
"code-runner.executorMap": "python": "cd $workspaceRoot &&set PYTHONPATH=$dir;$workspaceRoot&& C:/Python3632/python $fullFileName"
But, the variable $dir in code-runner is : "D:/pro/foo/" have a quote mark ", so it raise an ERROR. I must use some complex DOS shell snip to remove it.
"python": "cd $workspaceRoot &set p=$dir&&set PYTHONPATH=%p:"=%;$workspaceRoot&& C:/Python3632/python $fullFileName"
maybe remove all of quote mark in the $var string is a better design. Users can add quote mark " by themselves.
agree, same issue
Any news?