I\'m developing a program that has a button. When pressed, I want to open a terminal that runs:
sudo apt-get update
I\'m using:
import os
os.system("Your command") You can also pass custom command as custom variable For example:
cmd_to_run = "ls -lat"
os.system(cmd_to_run)