📅  最后修改于: 2022-03-11 14:47:14.837000             🧑  作者: Mango
代码示例2
>>> f = open('/tmp/generic.png','r')
>>> f.name
'/tmp/generic.png'
>>> import os
>>> os.path.basename(f.name)
'generic.png'