sas package

Subpackages

Submodules

sas.logger_config module

class sas.logger_config.SetupLogger(logger_name)[source]

Bases: object

Called at the beginning of run.py or sasview.py

__dict__ = mappingproxy({'__module__': 'sas.logger_config', '__doc__': '\n    Called at the beginning of run.py or sasview.py\n    ', '__init__': <function SetupLogger.__init__>, 'config_production': <function SetupLogger.config_production>, 'config_development': <function SetupLogger.config_development>, '_disable_debug_from_config': <function SetupLogger._disable_debug_from_config>, '_read_config_file': <function SetupLogger._read_config_file>, '_update_all_logs_to_debug': <function SetupLogger._update_all_logs_to_debug>, '_find_config_file': <function SetupLogger._find_config_file>, '__dict__': <attribute '__dict__' of 'SetupLogger' objects>, '__weakref__': <attribute '__weakref__' of 'SetupLogger' objects>, '__annotations__': {}})
__doc__ = '\n    Called at the beginning of run.py or sasview.py\n    '
__init__(logger_name)[source]
__module__ = 'sas.logger_config'
__weakref__

list of weak references to the object (if defined)

_disable_debug_from_config()[source]

disable DEBUG logs as per user configuration (DEBUG logs disabled by default)

_find_config_file(filename='logging.ini')[source]

The config file is in: Debug ./sasview/ Packaging: sas/sasview/ Packaging / production does not work well with absolute paths thus the multiple paths below

_read_config_file()[source]
_update_all_logs_to_debug(logger)[source]

This updates all loggers and respective handlers to DEBUG

config_development()[source]
config_production()[source]

Module contents

sas.get_app_dir()[source]

The directory where the sasview application is found.

Returns the path to sasview if running in place or installed with setup. If the application is frozen, returns the parent directory of the application resources such as test files and images.

sas.get_custom_config()[source]

Setup the custom config dir and cat file

sas.get_local_config()[source]

Loads the local config file.

sas.get_user_dir()[source]

The directory where the per-user configuration is stored.

Returns ~/.sasview, creating it if it does not already exist.

sas.make_custom_config_path()[source]