def get_default_cache():
try:<EOL><INDENT>return os.environ['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>pass<EOL><DEDENT>if os.name!='<STR_LIT>':<EOL><INDENT>return os.path.expanduser('<STR_LIT>')<EOL><DEDENT>app_data = '<STR_LIT>'   <EOL>app_homes = [<EOL>(('<STR_LIT>',), None),       <EOL>(('<STR_LIT>',), app_data),<EOL>(('<STR_LIT>','<STR_LIT>'), app_data),<EOL>(('<STR_LIT>',), app_data),<EOL>(('<STR_LIT>',), None),<EOL>(('<STR_LIT>',), app_data),    <EOL>]<EOL>for keys, subdir in app_homes:<EOL><INDENT>dirname = '<STR_LIT>'<EOL>for key in keys:<EOL><INDENT>if key in os.environ:<EOL><INDENT>dirname = os.path.join(dirname, os.environ[key])<EOL><DEDENT>else:<EOL><INDENT>break<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if subdir:<EOL><INDENT>dirname = os.path.join(dirname,subdir)<EOL><DEDENT>return os.path.join(dirname, '<STR_LIT>')<EOL><DEDENT><DEDENT>else:<EOL><INDENT>raise RuntimeError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>
Determine the default cache location

    This returns the ``PYTHON_EGG_CACHE`` environment variable, if set.
    Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the
    "Application Data" directory.  On all other systems, it's "~/.python-eggs".