def data_dir_base():
 if (sys.platform == 'darwin'):
  base = os.path.expanduser('~/Library/Application Support')
 elif (sys.platform == 'win32'):
  base = os.getenv('APPDATA', os.path.expanduser('~/AppData/Local'))
 elif (os.name == 'posix'):
  base = os.getenv('XDG_DATA_HOME', os.path.expanduser('~/.local/share'))
 else:
  base = os.path.expanduser('~/.local/share')
 return base

def data_dir_base ( ) : if ( sys . platform == 'darwin' ) : base = os . path . expanduser ( '~/Library/Application Support' ) elif ( sys . platform == 'win32' ) : base = os . getenv ( 'APPDATA' , os . path . expanduser ( '~/AppData/Local' ) ) elif ( os . name == 'posix' ) : base = os . getenv ( 'XDG_DATA_HOME' , os . path . expanduser ( '~/.local/share' ) ) else : base = os . path . expanduser ( '~/.local/share' ) return base
return the platform dependent application directory .