< Previous | Contents | Next >

Differences with FusionScript

As already noted Fuses cannot be written in Python.

Also EventScripts, callback scripts for certain events are also only possible with Lua.

Since historically FusionScript was Lua only, some methods that return multiple statements have a special Table() suffix variant to return the proper table for use in Python.

As the Lua collection is a tuple, you will need to pass a dictionary to the API in many cases, even when it seems to be treated like a list.

So each Value needs to have a key in the order of the entry.


For example a list like:

l = [“a”, “b”, “c”]


needs to map to a dictionary

d = {1: “a”, 2: “b”, 3:”c” }


Please note that Lua uses 1 as the first index key of its tuples, not 0. Python dictionaries do not have a particular order. Only the key indicates their order in this case.

Similarly, all Lua tuples result in dictionaries in Python that need to be parsed into Lists. If order does not matter, it can be simply done by:

l = d.values()


If order is important their values need to be sorted by their keys before conversion to a list. This can be achieved with a list comprehension:

l = [item[1] for item in sorted(d.items())]