Is there anything more efficient or faster in Python that using the subprocess.call
method? I noticed there was a SO question (Python subprocess module much slower than commands (deprecated)) about this a year ago except it became depreciated due to Python removing that alternative, so I am looking to see if this is now the only and thus fastest means to call a command to the shell from within Python. Specifically I am running the following command:
subprocess.call("foo",shell=True)
Or should I be using os
?
Thanks.