更新时间:2022-12-07 18:41:32
Ctrl + C的答案已经提示$ FileName $,至少在当前版本的PyCharm 2020.2中,它可以在运行配置"中使用.
The answer by Ctrl+C already hints at $FileName$ and at least in the current version 2020.2 of PyCharm this works in Run Configurations.
Python
Parameters
字段中,您可以简单地使用 $ FileName $
或 $ FilePath $
之类的宏.或单击右端的 +
以获得完整列表 Shift + F10
Python
Parameters
field you can simply use macros like $FileName$
or $FilePath$
. Or click on the +
at the right end for a full listShift+F10
by default while your target file is opened