bootstrap.Options¶
-
class
bootstrap.lib.options.
Options
[source]¶ Options is a singleton. It parses a yaml file to generate rules to the argument parser. If a path to a yaml file is not provided, it relies on the -o/–path_opts command line argument.
Parameters: path_yaml (str) – path to the yaml file Example usage:
# parse the yaml file and create options Options(path_yaml='bootstrap/options/example.yaml') opt = Options() # get the options dictionary from the singleton print(opt['exp']) # display a dictionary print(opt['exp.dir']) # display a value print(opt['exp']['dir']) # display the same value