I have a problem with the following code:
callBash.py:
import subprocess
print "start"
subprocess.call("sleep.sh")
print "end"
sleep.sh:
sleep 10
I want the "end" to be printed after 10s. (I know that this is a dumb example, I could simply sleep within python, but this simple sleep.sh file was just as a test)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…