def get_configdir():
    """Return string representing the configuration directory.

    Default is $HOME/.config/glymur.  You can override this with the
    XDG_CONFIG_HOME environment variable.
    """
    if 'XDG_CONFIG_HOME' in os.environ:
        return os.path.join(os.environ['XDG_CONFIG_HOME'], 'glymur')

    if 'HOME' in os.environ and os.name != 'nt':
        # HOME is set by WinPython to something unusual, so we don't
        # necessarily want that.
        return os.path.join(os.environ['HOME'], '.config', 'glymur')

    # Last stand.  Should handle windows... others?
    return os.path.join(os.path.expanduser('~'), 'glymur')
def get_configdir ( ) : if 'XDG_CONFIG_HOME' in os . environ : return os . path . join ( os . environ [ 'XDG_CONFIG_HOME' ] , 'glymur' ) if 'HOME' in os . environ and os . name != 'nt' : return os . path . join ( os . environ [ 'HOME' ] , '.config' , 'glymur' ) return os . path . join ( os . path . expanduser ( '~' ) , 'glymur' )
Return string representing the configuration directory.

    Default is $HOME/.config/glymur.  You can override this with the
    XDG_CONFIG_HOME environment variable.