← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #156909]: MAC : Issue with exit code from sikuli for RC2

 

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

RaiMan posted a new comment:
BTW: subprocess.wait() does both: wait for completion AND return the
returncode.

so you just say:

returnvalue = subprocess.Popen(<what ever needed>).wait()

Only if you want to access stdin/stdout/stderr, you have to save the
Popen object:

p = subprocess.Popen(<what ever needed>)
returnvalue = p.wait
for line in p.stdout:
   print line

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