Get the directory path of absolute file path in Python,os.path.dirname(fullpath)