1 #!/usr/bin/python 2 3 import pprint, sys 4 import flimflam 5 6 flim = flimflam.FlimFlam() 7 8 if (len(sys.argv) < 2): 9 print "Usage: %s <service_name>" % (sys.argv[0]) 10 sys.exit(1) 11 12 service = flim.FindElementByPropertySubstring('Service', 13 'Name', 14 sys.argv[1]) 15 16 if not service: 17 print "Could not find service: %s" % (sys.argv[1]) 18 sys.exit(1) 19 20 pprint.pprint(flim.DisconnectService(service)) 21