Jak wykonać polecenia bash w skrypcie Python
import subprocess
subprocess.call(["sudo", "apt", "update"])
Common Melba Finch
import subprocess
subprocess.call(["sudo", "apt", "update"])
import os
stream = os.popen('echo Returned output')
output = stream.read()
output