Question #686822 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/686822

RaiMan proposed the following answer:
exec need a string, that represents an executable statement/expression.

It looks like you want to execute something like this in your function:

Settings.timerX = time.time()+nnnn.nnn and
Settings.timerX - time.time()

where X is the value given by parameter name

So do it this way:

    if elapse >0:
        exec("Settings.timer%d = time.time() + %d"%(name. elapse))
    else:
        rest = eval("Settings.timer%d - time.time()"%(name))

but be aware:
Settings.timer1
Settings.timer2
Settings.timer3

must be set before first use like
Settings.timer =time.time()

which in turn is never used

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to