(f)
return os.path.dirname(os.path.abspath(f))
Returns the absolute path to the directory containing the specified file.

    :type f: str
    :param f: A path to a file, either absolute or relative

    :rtype:  str
    :return: The absolute path of the directory represented by the relative path provided.
Returns the absolute path to the directory containing the specified file.
Returns the absolute path to the directory containing the specified file .
def get_dir_of_file(f):
    '''
    Returns the absolute path to the directory containing the specified file.

    :type f: str
    :param f: A path to a file, either absolute or relative

    :rtype:  str
    :return: The absolute path of the directory represented by the relative path provided.
    '''
    return os.path.dirname(os.path.abspath(f))
def get_dir_of_file ( f ) : return os . path . dirname ( os . path . abspath ( f ) )