ParsedDynamicAttributes_Component

class ParsedDynamicAttributes_Component(component: QComponent, key_list: List[str] = None)[source]

Provides a parsing view of the component options.

When accessed, returns parse versions of the user options. Works with nested options too.

Example

component.options = {'x':'1nm'}
print(component.p.x)

>> float(1e7)

Parameters:
  • component (QComponent) – Component to get options from.

  • key_list (List[str]) – List of keys. Defaults to None.

Methods

ParsedDynamicAttributes_Component.__getitem__(name)

Get the item associated with the given name.

ParsedDynamicAttributes_Component.__len__()

Return the length.

ParsedDynamicAttributes_Component.items()

Produces tuples consisting of keys and respective parsed values for iterating over a dictionary.