Ubuntu Pastebin

Paste from robert-ancell at Tue, 27 Jun 2017 14:41:51 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
import gi
gi.require_version('Snapd', '1')

from gi.repository import Snapd

def progress_cb (client, change, deprecated, user_data):
     print "progress"

client = Snapd.Client ()
client.connect_sync ()

print "Installing"
client.install2_sync (Snapd.InstallFlags.NONE,
                      "moon-buggy",
                      None, # channel
                      None, # revision
                      progress_cb, (None,),
                      None) # cancellable
Download as text