I know we can call like this:
os.system("ant compile")
But how to know whether the ant task is successful or not?
And is there another way to invoke ant task?
I know we can call like this:
os.system("ant compile")
But how to know whether the ant task is successful or not?
And is there another way to invoke ant task?
Can you modify ant to return a success code and capture that in python in it's return?
http://www.dotkam.com/2008/10/24/getting-return-code-from-ant-in-shell/
import subprocess
p1 = subprocess.Popen('ant compile', stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
print p1.stdout.read(-1)
print p1.stdin.read(-1)
print p1.stderr.read(-1)
Try using subprocess to get the output/error.....