os.path.dirname

os.path.dirname(p)

Returns the directory component of a pathname

Navigation