Use os.path.basename(path) to get the filename.
os.path.basename(path)
This might help someone:
names = [os.path.basename(x) for x in glob.glob('/your_path')]
map(os.path.basename, glob.glob("your/path"))
Returns an iterable with all the file names and extensions.