Cómo ejecutar comandos bash en el script de 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