name_to_name_index¶
-
lsst.ts.salobj.
name_to_name_index
(name)¶ Parse a SAL component name of the form name[:index].
Parameters: - name :
str
Component name of the form
name
orname:index
. The default index is 0.
Raises: - ValueError
If the name cannot be parsed.
Notes
Examples:
"Script" -> ("Script", 0)
"Script:0" -> ("Script", 0)
"Script:15" -> ("Script", 15)
" Script:15" -> raise ValueError (leading space)
"Script:15 " -> raise ValueError (trailing space)
"Script:" -> raise ValueError (colon with no index)
"Script:zero" -> raise ValueError (index not an integer)
- name :