Code: Select all
('Exec', 'Result = (2+3)*2', 'Result', 10)
NameError: name 'Result' is not defined
exec() listed in builtin MicroPython function, with no description or usage
http://docs.micropython.org/en/latest/w ... ltins.html
Any ideas?
Code: Select all
def ExecScript(aValue = "Result = (2+3)*2"):
exec(aValue)
print("Exec", aValue, "Result", Result)
return Result