def get_defaults(path):
    '''
    Reads file for configuration defaults.

    Arguments:
        - path (str) Absolute filepath (usually ~/.licenser)

    Returns:
        - (dict) Defaults for name, email, license, .txt extension
    '''

    defaults = {}

    if os.path.isfile(path):
        with open(path) as f:

            for line in f:
                line = line.strip()
                if '=' not in line or line.startswith('#'):
                    continue

                k, v = line.split('=', 1)
                v = v.strip('"').strip("'")

                defaults[k] = v
        return defaults
    else:
        return {}
def get_defaults ( path ) : defaults = { } if os . path . isfile ( path ) : with open ( path ) as f : for line in f : line = line . strip ( ) if '=' not in line or line . startswith ( '#' ) : continue k , v = line . split ( '=' , 1 ) v = v . strip ( '"' ) . strip ( "'" ) defaults [ k ] = v return defaults else : return { }
Reads file for configuration defaults.

    Arguments:
        - path (str) Absolute filepath (usually ~/.licenser)

    Returns:
        - (dict) Defaults for name, email, license, .txt extension