I need to automate the following command
cmd=\"yes | vgremove \"
whenever I code this command with
Popen(cmd.spli
There is a much easier way in this case:
Popen('vgremove -f ')
As for your question specifically:
p = Popen(cmd.split(), stdout=PIPE, stderr=PIPE, stdin=PIPE) p.stdin.write('yes')