-3

Is it possible to use os.system to install a program on apt-get. Here's what I've tried so far:

if comm == "install":
  os.system("gnome-terminal -e sudo apt-get install"+args)

(args being the argument supplied to the command)

tshepang
  • 12,111
  • 21
  • 91
  • 136
Lambda
  • 3
  • 2

1 Answers1

1

It is possible, but I'd personally avoid using os.system() (or preferred subprocess module calls) for python apt interface: homepage

It gives you much more flexibility than plain os.system() (e.g. installation progress reporting etc.)

Gabriel M
  • 710
  • 4
  • 7