def get_config_dir():
 if mswin:
  confdir = os.environ['APPDATA']
 elif ('XDG_CONFIG_HOME' in os.environ):
  confdir = os.environ['XDG_CONFIG_HOME']
 else:
  confdir = os.path.join(os.path.expanduser('~'), '.config')
 mps_confdir = os.path.join(confdir, 'mps-youtube')
 os.makedirs(mps_confdir, exist_ok=True)
 return mps_confdir

def get_config_dir ( ) : if mswin : confdir = os . environ [ 'APPDATA' ] elif ( 'XDG_CONFIG_HOME' in os . environ ) : confdir = os . environ [ 'XDG_CONFIG_HOME' ] else : confdir = os . path . join ( os . path . expanduser ( '~' ) , '.config' ) mps_confdir = os . path . join ( confdir , 'mps-youtube' ) os . makedirs ( mps_confdir , exist_ok = True ) return mps_confdir
determines the astropy configuration directory name and creates the directory if it doesnt exist .