python-validity/scripts/dbus-cmd.py
Arvid Norlander a17ad52102
Use optimise imports in PyCharm for cleanup.
This sorts imports into sections:
* From standard library
* From other libraries
* From the current project

Each section is sorted alphabetically.
2020-08-06 11:48:19 +02:00

12 lines
No EOL
411 B
Python
Executable file

#!/usr/bin/env python3
import dbus.mainloop.glib
dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
import sys
bus = dbus.SystemBus()
o = bus.get_object('net.reactivated.Fprint', '/net/reactivated/Fprint/Manager', introspect=False)
o = o.GetDefaultDevice()
o = bus.get_object('net.reactivated.Fprint', o, introspect=False)
o = dbus.Interface(o, 'net.reactivated.Fprint.Device')
print(o.RunCmd(sys.argv[1]))