#!/usr/bin/env python2

import gi
gi.require_version('CinnamonDesktop', '3.0')
from gi.repository import CinnamonDesktop, GLib
import sys


def finished_cb(success, data=None):
    if success:
        print("Finished!")
    else:
        print("Failed!")
    quit()

i = 1
pkgs = []

while i < len(sys.argv):
    pkgs.append(sys.argv[i])
    i+=1
print pkgs
CinnamonDesktop.installer_install_packages(pkgs, finished_cb, None)

ml = GLib.MainLoop.new(None, True)
ml.run()