I have for loop in python in each iteration of the loop I want to run a bash script and after its termination continue the loop and again run the bash script:
for batch in something: proc = Popen(['./mybash.sh']) proc.wait()
The mybash.sh script will compute something and display a value using echo
. However, when I run this code it seems that it executes mybash.sh script only once, since I can only see the value displayed by echo
only for the first iteration. What is wrong with the code? BTW, I am using python 3.5