spinn_utilities.configs package

Submodules

spinn_utilities.configs.camel_case_config_parser module

class spinn_utilities.configs.camel_case_config_parser.CamelCaseConfigParser(defaults=None, none_marker='None')[source]

Bases: ConfigParser.RawConfigParser

get_bool(section, option)[source]

Get the boolean value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value.

Return type:

bool

get_float(section, option)[source]

Get the float value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value.

Return type:

float

get_int(section, option)[source]

Get the integer value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value

Return type:

int

get_str(section, option)[source]

Get the string value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value

Return type:

str or None

optionxform(optionstr)[source]

Transforms the name of an option to lower case and strips underscores, so matching is more user-friendly.

read(filenames, encoding=None)[source]

Read and parse a filename or a list of filenames.

read_files

The configuration files that have been actually read.

spinn_utilities.configs.case_sensitive_parser module

class spinn_utilities.configs.case_sensitive_parser.CaseSensitiveParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False)[source]

Bases: ConfigParser.RawConfigParser

optionxform(optionstr)[source]

Performs no transformation of option strings.

spinn_utilities.configs.no_config_found_exception module

exception spinn_utilities.configs.no_config_found_exception.NoConfigFoundException[source]

Bases: exceptions.Exception

Throws when an existing Section has an extra config value

spinn_utilities.configs.unexpected_config_exception module

exception spinn_utilities.configs.unexpected_config_exception.UnexpectedConfigException[source]

Bases: exceptions.Exception

Throws when an existing Section has an extra config value

Module contents

class spinn_utilities.configs.CamelCaseConfigParser(defaults=None, none_marker='None')[source]

Bases: ConfigParser.RawConfigParser

get_bool(section, option)[source]

Get the boolean value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value.

Return type:

bool

get_float(section, option)[source]

Get the float value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value.

Return type:

float

get_int(section, option)[source]

Get the integer value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value

Return type:

int

get_str(section, option)[source]

Get the string value of an option.

Parameters:
  • section (str) – What section to get the option from.
  • option (str) – What option to read.
Returns:

The option value

Return type:

str or None

optionxform(optionstr)[source]

Transforms the name of an option to lower case and strips underscores, so matching is more user-friendly.

read(filenames, encoding=None)[source]

Read and parse a filename or a list of filenames.

read_files

The configuration files that have been actually read.

class spinn_utilities.configs.CaseSensitiveParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False)[source]

Bases: ConfigParser.RawConfigParser

optionxform(optionstr)[source]

Performs no transformation of option strings.

exception spinn_utilities.configs.NoConfigFoundException[source]

Bases: exceptions.Exception

Throws when an existing Section has an extra config value

exception spinn_utilities.configs.UnexpectedConfigException[source]

Bases: exceptions.Exception

Throws when an existing Section has an extra config value