Best practices for return value from sikuli script?

Asked by sandeep

What is the best practices for returning value from a sikuli script?,
I would like to indicate whether the script passed or failed, can I return 0 or return 1?
Or should I says sys.exit(0) ?

Thx

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
sandeep
Solved:
Last query:
Last reply:
Revision history for this message
Eugene S (shragovich) said :
#1

Hi,

I don't think using "return" is relevant in your case as you can use it only within the scope of a function, not just anywhere.
So the option you have are either using exit code different than 0 as you mentioned yourself or just creating simple text or csv file and write test status there. For example each one of your scripts can have a last line that will write some value to a file.

Revision history for this message
sandeep (sbaldawa) said :
#2

Thanks , got it.