How can I get the path of a file without the file basename ?
Something like /a/path/to/my/file.txt --> /a/path/to/my/
/a/path/to/my/file.txt
/a/path/to/my/
Tried with .split
(dirname, filename) = os.path.split(path)