I am using subprocess.poll to read the status of standard out and error.
while subprocess.poll() is None :
out = subprocess.stdout.readline()
print out
Process comes out of loop before job exection completes. how can i wait till job finishes?