pylabrobot.resources.ItemizedResource.get_items#
- ItemizedResource.get_items(identifier: Union[str, Sequence[int], Sequence[str]]) List[T] #
Get the items with the given identifier.
- Parameters:
identifier (Union[str, Sequence[int], Sequence[str]]) – The identifier of the items. Either a string or a list of integers. If a string, it uses transposed MS Excel style notation, e.g. “A1” for the first item, “B1” for the item below that, etc. Regions of items can be specified using a colon, e.g. “A1:H1” for the first column. If a list of integers, it is the indices of the items in the list of items (counted from 0, top to bottom, left to right).
- Returns:
The items with the given identifier.
- Return type:
List[T]
Examples
Getting the items with identifiers “A1” through “E1”:
>>> items.get_items("A1:E1")
[<Item A1>, <Item B1>, <Item C1>, <Item D1>, <Item E1>]
Getting the items with identifiers 0 through 4:
>>> items.get_items(range(5))
[<Item A1>, <Item B1>, <Item C1>, <Item D1>, <Item E1>]