Is there a way I can use glob on a directory, to get files with a specific extension, but only the filename itself, not the whole path?
map(os.path.basename, glob.glob("your/path"))
Returns an iterable with all the file names and extensions.