Home | Trees | Indices | Help |
|
---|
|
Support code for the freedesktop.org basedir spec.
This module provides functions for locating configuration files.
Functions | |||
str |
|
||
|
|||
str | None |
|
||
str |
|
||
|
|||
str | None |
|
||
|
|||
str | None |
|
||
str |
|
Variables | |
home = pwd.getpwuid(0).pw_dir or '/' The value of $HOME (or '/' if not set). |
|
portable_base = os.environ.get('ZEROINSTALL_PORTABLE_BASE')
|
|
appData = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0)
|
|
localAppData = shell.SHGetFolderPath(0, shellcon.CSIDL_LOCAL_A
|
|
commonAppData = shell.SHGetFolderPath(0, shellcon.CSIDL_COMMON
|
|
xdg_data_dirs = _get_path('XDG_DATA_HOME', 'XDG_DATA_DIRS', _d
|
|
xdg_cache_dirs = _get_path('XDG_CACHE_HOME', 'XDG_CACHE_DIRS',
|
|
xdg_config_dirs = _get_path('XDG_CONFIG_HOME', 'XDG_CONFIG_DIR
|
|
xdg_data_home = xdg_data_dirs [0]
|
|
xdg_cache_home = xdg_cache_dirs [0]
|
|
xdg_config_home = xdg_config_dirs [0]
|
Function Details |
Ensure $XDG_CONFIG_HOME/<resource>/ exists, and return its path. 'resource' should normally be the name of your application. Use this when SAVING configuration settings. Use the xdg_config_dirs variable for loading.
|
Returns an iterator which gives each directory named 'resource' in the configuration search path. Information provided by earlier directories should take precedence over later ones (ie, the user's config dir comes first). |
Ensure $XDG_CACHE_HOME/<resource>/ exists, and return its path. 'resource' should normally be the name of your application.
|
Returns an iterator which gives each directory named 'resource' in the cache search path. Information provided by earlier directories should take precedence over later ones (ie, the user's cache dir comes first). |
Returns an iterator which gives each directory named 'resource' in the shared data search path. Information provided by earlier directories should take precedence over later ones. Since: 0.28 |
Returns the first result from load_data_paths, or None if there is nothing to load.
Since: 0.28 |
Ensure $XDG_DATA_HOME/<resource>/ exists, and return its path. 'resource' should normally be the name of your application.
|
Variables Details |
homeThe value of $HOME (or '/' if not set). If we're running as root and $HOME isn't owned by root, then this will be root's home from /etc/passwd instead.
|
localAppData
|
commonAppData
|
xdg_data_dirs
|
xdg_cache_dirs
|
xdg_config_dirs
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Mar 26 18:14:06 2013 | http://epydoc.sourceforge.net |