HandlerParameters Class Reference

class activeconfigparser.HandlerParameters.HandlerParameters[source]

Bases: object

Contains the set of parameters that we pass to handlers.

These properties use the StronglyTypedProperty python package set up an enforced strong typing scheme. We do this because handlers really need to stay on the rails or ActiveConfigPArser can become unstable.

Properties:

  • section_root : The root section from which we got to this operation that is being parsed. If there are many use operations creating a complex DAG then this can be useful for debugging.

  • raw_option : The raw option data without any processing.

  • op : The operation keyword provided from <op> [<param1..N>] : value.

  • params : The list of parameters provided from <op> [<param1..N>] : value.

  • value : The value provided from <op> [<param1..N>] : value.

  • data_shared : A dict type where data can be written to that will persist beyond this specific handler. This is useful if your ActiveConfigParser subclass needs to save information generated from the operations in the .ini file.

  • data_internal : A dict type that can be used as a cache to save information while processing this handler.

  • handler_name : The name fo the current handler being used for convenience.

property data_internal
property data_shared
property handler_name
property op
property params
property raw_option
property section_root
property value
activeconfigparser.HandlerParameters.value_len_eq_2(value)[source]

Validates that the length of the paramter is equal to 2.

Assumes that value is an interable.

Returns:

0 (FAIL) if length != 2, otherwise 1 (PASS).

Return type:

int