def directoryPath(filepath):
 retVal = filepath
 if filepath:
  retVal = (ntpath.dirname(filepath) if isWindowsDriveLetterPath(filepath) else posixpath.dirname(filepath))
 return retVal

def directoryPath ( filepath ) : retVal = filepath if filepath : retVal = ( ntpath . dirname ( filepath ) if isWindowsDriveLetterPath ( filepath ) else posixpath . dirname ( filepath ) ) return retVal
returns directory path for a given filepath .