Module Expr Str ImportFrom alias Import alias Import alias ImportFrom alias alias FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore BoolOpOr BoolOpAnd NameLoad Str Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str NameLoad orelse Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr Str Call NameLoad Str NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Call NameLoad NameLoad keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore Call NameLoad NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad Str Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr Str body Assign NameStore ListLoad Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr Str Str If NameLoad body Assign NameStore ListComp Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad NameLoad NameLoad comprehension NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Str Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Import alias Assign NameStore SubscriptLoad Dict Str Str Str Str Str Str Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore SubscriptLoad Dict Str Str Str Num Num Num Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad NameLoad NameLoad Num NameLoad Assign NameStore NameLoad For NameStore NameLoad body If CompareGt Call NameLoad NameLoad Num body Assign NameStore NameLoad Break If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num If Call AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr AttributeLoad NameLoad attr NameLoad Num body Assign NameStore NameLoad Return AttributeLoad NameLoad attr decorator_list If NameLoad body TryExcept body Import alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad
N/A N/A 
This code was taken from https://github.com/ActiveState/appdirs and modified
to suit our purposes.
 __future__ absolute_import N/A os N/A sys pip.compat WINDOWS expanduser user_cache_dir N/A N/A appname N/A N/A N/A 
    Return full path to the user-specific cache dir for this application.

        "appname" is the name of application.

    Typical user cache directories are:
        Mac OS X:   ~/Library/Caches/<AppName>
        Unix:       ~/.cache/<AppName> (XDG default)
        Windows:      C:\Users\<username>\AppData\Local\<AppName>\Cache

    On Windows the only suggestion in the MSDN docs is that local settings go
    in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the
    non-roaming app data dir (the default returned by `user_data_dir`). Apps
    typically put cache data somewhere *under* the given dir here. Some
    examples:
        ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache
        ...\Acme\SuperApp\Cache\1.0

    OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.
     N/A WINDOWS N/A N/A path N/A N/A N/A os path normpath N/A _get_win_folder CSIDL_LOCAL_APPDATA N/A path N/A N/A N/A os path join path appname Cache N/A N/A N/A N/A sys platform darwin N/A N/A path N/A expanduser ~/Library/Caches N/A path N/A N/A N/A os path join path appname N/A N/A path N/A N/A os getenv XDG_CACHE_HOME N/A expanduser ~/.cache N/A path N/A N/A N/A os path join path appname N/A path N/A user_data_dir N/A N/A appname roaming N/A False N/A N/A 
    Return full path to the user-specific data dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "roaming" (boolean, default False) can be set True to use the Windows
            roaming appdata directory. That means that for users on a Windows
            network setup for roaming profiles, this user data will be
            sync'd on login. See
            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
            for a discussion of issues.

    Typical user data directories are:
        Mac OS X:               ~/Library/Application Support/<AppName>
        Unix:                   ~/.local/share/<AppName>    # or in
                                $XDG_DATA_HOME, if defined
        Win XP (not roaming):   C:\Documents and Settings\<username>\ ...
                                ...Application Data\<AppName>
        Win XP (roaming):       C:\Documents and Settings\<username>\Local ...
                                ...Settings\Application Data\<AppName>
        Win 7  (not roaming):   C:\Users\<username>\AppData\Local\<AppName>
        Win 7  (roaming):       C:\Users\<username>\AppData\Roaming\<AppName>

    For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
    That means, by default "~/.local/share/<AppName>".
     N/A WINDOWS N/A N/A const N/A N/A roaming CSIDL_APPDATA CSIDL_LOCAL_APPDATA N/A path N/A N/A N/A os path join N/A N/A N/A os path normpath N/A _get_win_folder const appname N/A N/A N/A N/A sys platform darwin N/A N/A path N/A N/A N/A os path join N/A expanduser ~/Library/Application Support/ appname N/A N/A path N/A N/A N/A os path join N/A N/A os getenv XDG_DATA_HOME N/A expanduser ~/.local/share appname N/A path N/A user_config_dir N/A N/A appname roaming N/A True N/A N/A Return full path to the user-specific config dir for this application.

        "appname" is the name of application.
            If None, just the system directory is returned.
        "roaming" (boolean, default True) can be set False to not use the
            Windows roaming appdata directory. That means that for users on a
            Windows network setup for roaming profiles, this user data will be
            sync'd on login. See
            <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
            for a discussion of issues.

    Typical user data directories are:
        Mac OS X:               same as user_data_dir
        Unix:                   ~/.config/<AppName>
        Win *:                  same as user_data_dir

    For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
    That means, by deafult "~/.config/<AppName>".
     N/A WINDOWS N/A N/A path N/A user_data_dir appname roaming roaming N/A N/A N/A N/A sys platform darwin N/A N/A path N/A user_data_dir appname N/A N/A path N/A N/A os getenv XDG_CONFIG_HOME N/A expanduser ~/.config N/A path N/A N/A N/A os path join path appname N/A path N/A site_config_dirs N/A N/A appname N/A N/A N/A Return a list of potential user-shared config dirs for this application.

        "appname" is the name of application.

    Typical user config directories are:
        Mac OS X:   /Library/Application Support/<AppName>/
        Unix:       /etc or $XDG_CONFIG_DIRS[i]/<AppName>/ for each value in
                    $XDG_CONFIG_DIRS
        Win XP:     C:\Documents and Settings\All Users\Application ...
                    ...Data\<AppName>        Vista:      (Fail! "C:\ProgramData" is a hidden *system* directory
                    on Vista.)
        Win 7:      Hidden, but writeable on Win 7:
                    C:\ProgramData\<AppName>     N/A WINDOWS N/A N/A path N/A N/A N/A os path normpath N/A _get_win_folder CSIDL_COMMON_APPDATA N/A pathlist N/A N/A N/A N/A os path join path appname N/A N/A N/A N/A sys platform darwin N/A N/A pathlist N/A N/A N/A N/A os path join /Library/Application Support appname N/A N/A xdg_config_dirs N/A N/A os getenv XDG_CONFIG_DIRS /etc/xdg N/A xdg_config_dirs N/A N/A pathlist N/A N/A N/A N/A os path join N/A expanduser x appname N/A x N/A N/A xdg_config_dirs split N/A os pathsep N/A N/A pathlist N/A N/A N/A N/A pathlist append /etc N/A pathlist N/A _get_win_folder_from_registry N/A N/A csidl_name N/A N/A N/A 
    This is a fallback technique at best. I'm not sure if using the
    registry for this guarantees us the correct answer for all CSIDL_*
    names.
     N/A _winreg N/A shell_folder_name N/A N/A CSIDL_APPDATA CSIDL_COMMON_APPDATA CSIDL_LOCAL_APPDATA AppData Common AppData Local AppData N/A csidl_name N/A key N/A N/A _winreg OpenKey N/A _winreg HKEY_CURRENT_USER Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders N/A N/A directory _type N/A N/A _winreg QueryValueEx key shell_folder_name N/A directory N/A _get_win_folder_with_ctypes N/A N/A csidl_name N/A N/A N/A csidl_const N/A N/A CSIDL_APPDATA CSIDL_COMMON_APPDATA CSIDL_LOCAL_APPDATA 26 35 28 N/A csidl_name N/A buf N/A N/A ctypes create_unicode_buffer 1024 N/A N/A N/A N/A N/A ctypes windll shell32 SHGetFolderPathW None csidl_const None 0 buf N/A has_high_char False N/A c buf N/A N/A N/A N/A ord c 255 N/A N/A has_high_char True N/A N/A has_high_char N/A N/A buf2 N/A N/A ctypes create_unicode_buffer 1024 N/A N/A N/A N/A N/A ctypes windll kernel32 GetShortPathNameW N/A buf value buf2 1024 N/A N/A buf buf2 N/A N/A buf value N/A N/A WINDOWS N/A N/A N/A N/A ctypes N/A _get_win_folder _get_win_folder_with_ctypes N/A N/A N/A ImportError N/A N/A _get_win_folder _get_win_folder_from_registry