I have the following function, which has been working great for months. I have not updated my version of Python (unless it happens behind the scenes?).
def
This answer is a bit late. However, I had the same problem and subprocess didn't seem to work. I solved it by writing the command into a bash-file and executing the bash-file via python os.system:
vi forPython.sh (write 'my command' into it)
chmod +x forPython.sh
(in Python script)
os.system("./forPython.sh")
This makes python wait for your process to finish.