hpcflow.sdk.core.utils.check_valid_py_identifier#
- hpcflow.sdk.core.utils.check_valid_py_identifier(name)#
Check a string is (roughly) a valid Python variable identifier and return it.
- The rules are:
name must not be empty
name must not be a Python keyword
name must begin with an alphabetic character, and all remaining characters must be alphanumeric.
Notes
- The following attributes are passed through this function on object initialisation:
ElementGroup.name
Executable.label
Parameter.typ
TaskObjective.name
TaskSchema.method
TaskSchema.implementation
Loop.name