Re: [Sikuli-driver] [Question #644788]: Waiting execution

2017-06-24 Thread alex
Question #644788 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644788

Status: Answered => Solved

alex confirmed that the question is solved:
Thanks masuo, that solved my question.

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #644788]: Waiting execution

2017-06-24 Thread masuo
Question #644788 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/644788

Status: Open => Answered

masuo proposed the following answer:
This is sample codes by using thread feature.
If you want to know more about thread feature , learn python.

import thread

def log_waiting(name, *args):
print "start",name
cnt = args[0]
while log_switch == True:
print "waiting...(%d)" % cnt
cnt = cnt - 1
sleep(1)
print "end",name

duration = 5
thread.start_new_thread(log_waiting,("Log Waiting",duration))
print "start sleep"
log_switch = True
sleep(duration)
log_switch = False
print "end sleep"

-- 
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 : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp