← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #239537]: How to simulate "GoTo" - end subroutine if condition met?

 

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

    Status: Open => Answered

obiwan-92 proposed the following answer:
Hi.
Like you probably see, Python have no goto.
You have to use a function and if to do what you ask.

So put your "ExitAndNotify(a)" in a function(for example def fct_exit())
and at the end of it, add "exit(0)". il will exit the program.

and each time you want to check you write "if CheckIfConditionIsMet(a):
fct_exit()".

Regards.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.