I am trying to execute a command as follows but it is STUCK in try
block as below until the timeout kicks in,the python script executes fine by itself independently,can anyone suggest why is it so and how to debug this?
cmd = "python complete.py"
proc = subprocess.Popen(cmd.split(' '),stdout=subprocess.PIPE )
print "Executing %s"%cmd
try:
print "In try" **//Stuck here**
proc.wait(timeout=time_out)
except TimeoutExpired as e:
print e
proc.kill()
with proc.stdout as stdout:
for line in stdout:
print line,