Pass Arguments to system.util.invokeAsynchronous - Inductive Automation Ignition history

7 months ago

Full Code

from functools import partial

def myfunc(someArg1, someArg2, optionalKwarg=None, optionalKwarg2=None):
	print someArg1, someArg2,  optionalKwarg2, optionalKwarg

# switched the kwargs just to demonstrate flexibility.
part = partial(myfunc, 'muhArg1', 'muhArg2', optionalKwarg2='options2', optionalKwarg='options1') 

system.util.invokeAsynchronous(part)

Diff