paths = ['a/b/c/', 'a/b/c', '\\a\\b\\c', '\\a\\b\\c\\', 'a\\b\\c',
    'a/b/../../a/b/c/', 'a/b/../../a/b/c']
[path_leaf(path) for path in paths]
Extract file name from path, no matter what the os/path format