📝 Edit on GitHub
Shell
Running shell commands through Python
Read more in Python shell guide.
result = subprocess.run(cmd, capture_output=True, text=True, shell=True)
exitcode, data = subprocess.getstatusoutput(cmd)