Question

Getting generic lists in PythonCaller

  • 28 May 2020
  • 1 reply
  • 2 views

Userlevel 1
Badge +22

Hi.

FME supports lists in both a generic format (e.g. list{}) and as lists with attributes (e.g. list{}.value).

Is it possible in Python to get the latter form from a feature as a dict using just the simple format ?

E.g. from a feature attribute ( list{0}.value, list{1}.value, ... ) into

_myvar = feature.getAttribute("list{}") -- returning {"0":"value0","1":"value1",...} etc.

Just using "list{}" returns None as is.

Cheers


1 reply

Userlevel 4

Unfortunately this is not currently possible, as far as I know there is no dictionary support in the Python API.

It would make for a great idea, however!

Reply