environment
¶
Settings from the system environment relevant to NIPY
Return the closest possible equivalent to a ‘home’ directory. |
|
Get systemwide NIPY configuration file directory |
|
Get the NIPY user directory |
get_home_dir¶
-
nibabel.environment.
get_home_dir
()¶ Return the closest possible equivalent to a ‘home’ directory.
The path may not exist; code using this routine should not expect the directory to exist.
- Parameters
- None
- Returns
- home_dirstring
best guess at location of home directory
get_nipy_system_dir¶
-
nibabel.environment.
get_nipy_system_dir
()¶ Get systemwide NIPY configuration file directory
On posix systems this will be
/etc/nipy
. On Windows, the directory is less useful, but by default it will beC:\etc\nipy
The path may well not exist; code using this routine should not expect the directory to exist.
- Parameters
- None
- Returns
- nipy_dirstring
path to systemwide NIPY configuration directory
Examples
>>> pth = get_nipy_system_dir()
get_nipy_user_dir¶
-
nibabel.environment.
get_nipy_user_dir
()¶ Get the NIPY user directory
This uses the logic in get_home_dir to find the home directory and the adds either .nipy or _nipy to the end of the path.
We check first in environment variable
NIPY_USER_DIR
, otherwise returning the default of<homedir>/.nipy
(Unix) or<homedir>/_nipy
(Windows)The path may well not exist; code using this routine should not expect the directory to exist.
- Parameters
- None
- Returns
- nipy_dirstring
path to user’s NIPY configuration directory
Examples
>>> pth = get_nipy_user_dir()