I was recently introduced to the useful subprocess library and its Popen and call methods to fork out processes from the python process. However, I am somewhat confused by the general rules of how to form the list which is passed as an argument to popen. The first question is, why cannot I just pass a single string, just like what I would input to a terminal, instead of separating the elements into list items?
And then, what are the general rules? As an example, if the shell command looks like
/usr/bin/env python3 script.py arg1 arg2
then how should the Popen argument list look like? Can I pass any shell command? Then where can I find the general rules to split any shell command into list items?