Skip to main content
Question

Getting generic lists in PythonCaller

  • May 28, 2020
  • 1 reply
  • 6 views

lifalin2016
Contributor
Forum|alt.badge.img+29

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

david_r
Evangelist
  • May 28, 2020

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings