Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /www/wwwroot/sengshao.com/zb_system/function/c_system_event.php on line 2059

Deprecated: Using ${var} in strings is deprecated, use {$var} instead in /www/wwwroot/sengshao.com/zb_system/function/c_system_event.php on line 2060

Deprecated: Return type of Config::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/sengshao.com/zb_system/function/lib/config.php on line 26

Deprecated: Return type of Config::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/sengshao.com/zb_system/function/lib/config.php on line 36

Deprecated: Return type of Config::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/sengshao.com/zb_system/function/lib/config.php on line 31

Deprecated: Return type of Config::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/sengshao.com/zb_system/function/lib/config.php on line 41

Deprecated: Return type of Config::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /www/wwwroot/sengshao.com/zb_system/function/lib/config.php on line 17

Deprecated: Constant E_STRICT is deprecated in /www/wwwroot/sengshao.com/zb_system/function/c_system_debug.php on line 80

Deprecated: Constant E_STRICT is deprecated in /www/wwwroot/sengshao.com/zb_system/function/c_system_debug.php on line 80
vscode中使用python相对路径问题? - 僧少博客
当前位置:首页 > 编程 > 正文

vscode中使用python相对路径问题?

调试模式:


更改launch.json设置

在configurations中加入语句"cwd": "${fileDirname}"即可变成常规的相对路径模式


直接运行模式:


打开vscode,“文件”→“首选项”→“设置”,点击“用户”→“扩展”→“Python”,在右边找到“Terminal: Execute in File Dir”(这里也可以通过搜索栏里搜索)

勾选“When executing a file in the terminal, whether to use execute in the file's directory, instead of the current open folder.”


发表评论


Deprecated: Constant E_STRICT is deprecated in /www/wwwroot/sengshao.com/zb_system/function/c_system_debug.php on line 80