I need to automate the following command
cmd=\"yes | vgremove \"
whenever I code this command with
Popen(cmd.spli
Piping is a shell feature, so you'll need shell=True on that. What you're doing without shell=True is executing yes with arguments. yes never stops executing so the subprocess never returns.
shell=True
yes