TLDR: I am making a python wrapper around something for LabVIEW to use and I want to pass a dict
(or even kwargs) [i.e. key/value pairs] to a python script so I can have more dynamic function arguments.
LabVIEW 2018 implemented a Python Node which allows LabVIEW to interact with python scripts by calling, passing, and getting returned variables.
The issue is it doesn't appear to have native support for the dict
type:
Python Node Details Supported Data Types
The Python Node supports a large number of data types. You can use this node to call the following data types:
Numerics Arrays, including multi-dimensional arrays Strings Clusters Calling Conventions
This node converts integers and strings to the corresponding data types in Python, converts arrays to lists, and converts clusters to tuples.
Of course python is built around dictionaries but it appears LabVIEW does not support any way to pass a dictionary object.
Does anyone know of a way I can pass a cluster of named elements (or any other dictionary type) to a python script as a dict
object?