Do not use shell = True, it has many security holes. Instead, do something like this
cmd1 = ['vasp'] cmd2 = ['tee', 'tee_output'] runcmd = subprocess.Popen(cmd1, stdout=subprocess.PIPE) runcmd2 = subprocess.Popen(cmd2, stdin=runcmd.stdout, stdout=subprocess.PIPE) runcmd2.communicate()
I know him longer, but much safer.
user1178682
source share