for a in ('90','52.6', '26.5'):
if a == '90':
z = (' 0',)
elif a == '52.6':
z = ('0', '5')
else:
z = ('25')
for b in z:
cmd = exepath + ' -a ' + str(a) + ' -b ' + str(b)
process = Popen(cmd, shell=True, stderr=STDOUT, stdout=PIPE)
outputstring = process.communicate()[0]
outputlist = outputstring.splitlines()
for i in outputlist:
if i.find('The student says') != -1:
print i
Working on an assignment and this a snippet of my code. There is a portion above this code but all it's doing is defining exepath and just printing exepath to the screen. When I run this, I don't get an error or anything but the program just ends when put into the command prompt. Why? and how do I fix it?
Sorry for the quotes but the problem is it gives me nothing back it just exits... What could the problem be?