[python] pathlib.Path.stem 获取文件名,不要后缀名. getting filename, no extension
Python 3.4+
Use pathlib.Path.stem
>>> from pathlib import Path
>>> Path("/path/to/file.txt").stem
'file'
>>> Path("/path/to/file.tar.gz").stem
'file.tar'
参考:https://stackoverflow.com/questions/678236/how-do-i-get-the-filename-without-the-extension-from-a-path-in-python#678242