exec π
Exec operations.
ExecMixin π
Mixin providing the Exec operations for a Session
.
This mixin is intended to be used in combination with BaseSession
and should not be instantiated on its own.
Intended usage
class Session(BaseSession, ExecMixin): ...
exec π
exec(
library: str | Path,
symbol: str,
arg_read: list[Any] | None = None,
arg_write: list[Any] | None = None,
) -> list[Any] | None
Performs the Exec operation.
Wraps the vaccel_exec()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| str | Path | The path to the shared object containing the function that will be called. | required |
| str | The name of the function contained in the above shared object. | required |
| list[Any] | None | The input arguments that will be passed to the called function. | None |
| list[Any] | None | The output arguments that will be passed to the called function. | None |
Returns:
Type | Description |
---|---|
list[Any] | None | The resulting outputs. |
Raises:
Type | Description |
---|---|
FFIError | If the C operation fails. |
Source code in vaccel/ops/exec.py
exec_with_resource π
exec_with_resource(
resource: Resource,
symbol: str,
arg_read: list[Any] | None = None,
arg_write: list[Any] | None = None,
) -> list[Any] | None
Performs the Exec with resource operation.
Wraps the vaccel_exec_with_resource()
C operation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
| Resource | The resource of the shared object containing the function that will be called. | required |
| str | The name of the function contained in the above shared object. | required |
| list[Any] | None | The input arguments that will be passed to the called function. | None |
| list[Any] | None | The output arguments that will be passed to the called function. | None |
Returns:
Type | Description |
---|---|
list[Any] | None | The resulting outputs. |
Raises:
Type | Description |
---|---|
FFIError | If the C operation fails. |