import os
os.path.basename(__file__)
file_name = os.path.basename(file_path)
>>> f = open('/tmp/generic.png','r')
>>> f.name
'/tmp/generic.png'
>>> import os
>>> os.path.basename(f.name)
'generic.png'
filesName = list(map(os.path.basename, glob.glob("..yourPath*txt")))
print(filesName)
file_name = os.path.basename("file_path")