tree.tree.
Tree
(*args, **kwargs)[source]¶Bases: object
Initialize the sdss tree object
This class provides Python programmatic access to the SDSS tree envionment structure
Parameters: |
|
---|---|
Variables: |
add_limbs
(key=None)[source]¶Add a new section from the tree into the existing os environment
Parameters: | key (str) – The section name to grab from the environment |
---|
add_paths_to_os
(key=None, update=None)[source]¶Add the paths in tree environ into the os environ
This code goes through the tree environ and checks for existence in the os environ, then adds them
Parameters: |
---|
branch_out
(limb=None)[source]¶Set the individual section branches
This adds the various sections of the config file into the tree environment for access later. Optically can specify a specific branch. This does not yet load them into the os environment.
Parameters: | limb (str/list) – The name of the section of the config to add into the environ or a list of strings |
---|
check_paths
(paths, update=None)[source]¶Check if the path is in the os environ, and if not add it
get_paths
(key)[source]¶Retrieve a set of environment paths from the config
Parameters: | key (str) – The section name to grab from the environment |
---|---|
Returns: | self.environ[newkey] (OrderedDict) – An ordered dict containing all of the paths from the specified section, as key:val = name:path |
load_config
(config=None)[source]¶loads a config file
Parameters: | config (str) – Optional name of manual config file to load |
---|