Changes in src/sas/__init__.py [b963b20:79492222] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/__init__.py
rb963b20 r79492222 1 __all__ = ['get_app_dir', 'get_user_dir',2 'get_local_config', 'get_custom_config']3 4 _APP_DIR = None5 def get_app_dir():6 """7 The directory where the sasview application is found.8 9 Returns the path to sasview if running in place or installed with setup.10 If the application is frozen, returns the parent directory of the11 application resources such as test files and images.12 """13 global _APP_DIR14 if not _APP_DIR:15 from ._config import find_app_dir16 _APP_DIR = find_app_dir()17 return _APP_DIR18 19 _USER_DIR = None20 def get_user_dir():21 """22 The directory where the per-user configuration is stored.23 24 Returns ~/.sasview, creating it if it does not already exist.25 """26 global _USER_DIR27 if not _USER_DIR:28 from ._config import make_user_dir29 _USER_DIR = make_user_dir()30 return _USER_DIR31 32 def make_custom_config_path():33 from ._config import make_custom_config_path as _make_path34 return _make_path(get_user_dir())35 36 _CUSTOM_CONFIG = None37 def get_custom_config():38 """39 Setup the custom config dir and cat file40 """41 global _CUSTOM_CONFIG42 if not _CUSTOM_CONFIG:43 from ._config import setup_custom_config44 _CUSTOM_CONFIG = setup_custom_config(get_app_dir(), get_user_dir())45 return _CUSTOM_CONFIG46 47 48 _LOCAL_CONFIG = None49 def get_local_config():50 """51 Loads the local config file.52 """53 global _LOCAL_CONFIG54 if not _LOCAL_CONFIG:55 from ._config import load_local_config56 _LOCAL_CONFIG = load_local_config(get_app_dir())57 return _LOCAL_CONFIG
Note: See TracChangeset
for help on using the changeset viewer.