When you call suprocess.Popen, you can pass the command to execute in two ways:
- A string that corresponds to the commandline that you would run at the shell prompt
command = "yum whatprovides 'java = 1.8.0'"
- A list where each argument to the command is a separate entry:
command = ["yum", "whatprovides", "java = 1.8.0"]
When you pass a string to subprocess.Popen, the command has to either have no arguments or be passed through the shell