I have hierarchical TCL values represented as strings like this: a {x y v w} b {i j k m}
.
The above value contains 3 dictionary objects, which can be queried using TCL expressions.
I need to convert a value like this to a corresponding Python hierarchical value. For the above string the Python value would be: {'a': {'x': 'y', 'v': 'w'}, 'b': {'i': 'j', 'k': 'm'}}
.
The standard Python module tkinter can convert TCL values to Python values.
But can it convert the hierarchical value, like I provided above, to its Python equivalent?