Python:获取当前py的文件名

  • 采用pathlib库
from pathlib import Path

Path(__file__).name
posted @ 2019-12-06 14:58  Danno  阅读(2994)  评论(0编辑  收藏  举报