NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

testing.nosepatch

Next topic

utils.onetime

This Page

utils.environment

Module: utils.environment

Settings from the system environment relevant to NIPY

Functions

nipy.utils.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_dir : string

best guess at location of home directory

nipy.utils.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 be ``C:etc

ipy``

The path may well not exist; code using this routine should not expect the directory to exist.
Parameters :

None :

Returns :

nipy_dir : string

path to systemwide NIPY configuration directory

Examples

>>> pth = get_nipy_system_dir()
nipy.utils.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_dir : string

path to user’s NIPY configuration directory

Examples

>>> pth = get_nipy_user_dir()