Visual Studio Code相对路径支持方法

Visual Studio Code相对路径支持方法

VSCode下载的源代码通常都是相对路径,为保证其正确运行需要

安装插件Relative Path

配置tasks.json

{
“version”: “0.1.0”,
“command”: “python”,
“isShellCommand”:true,
“args”: [“${file}”],
“showOutput”: “always”,
“options”: {
“env”: {
“PYTHONIOENCODING”: “UTF-8”
}
}
}

tasks.json运行办法Ctrl+Shift+B,这也是运行Pyhon代码的方法。

Python中文在output输出乱码的原因参见

https://zhuanlan.zhihu.com/p/32297934

https://aben20807.blogspot.com/2017/05/1060512-vs-code-python.html

猜你喜欢

转载自blog.csdn.net/e_lsh/article/details/81477976