📜  python 获取脚本名称 - Python 代码示例

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

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