This question and answer demonstrates how to use Python's subprocess module to interact with bash from Python.
So if subprocess doesn't use the system's default shell, then what shell does it use to run commands like this:
import subprocess
print subprocess.check_output(["ls", "-la"])
If shell is not passed as a keyword argument it uses fork_exec, or _winapi.CreateProceess
If shell=True:
/bin/sh, .cmd.exe.See:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With