📜  在 python 代码示例中获取当前脚本的名称

📅  最后修改于: 2022-03-11 14:46:46.588000             🧑  作者: Mango

代码示例1
Use __file__. If you want to omit the directory part (which might be present), you can use os.path.basename(__file__)