python subprocess.call() doesn't work with multiline shell commands
python subprocess.call() doesn't work with multiline shell commands Question: I would like to run this multiline shell commands: echo ‘a=?’ read a echo "a=$a" from a python script, using the subprocess.call() method. I wrote this, in test.py file: import shlex, subprocess args = ["echo", ‘a=?’,"read", "a", "echo", "a=$a"] subprocess.call(args) and when I execute it, I …