Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python networkmanager tutorial

>>> NetworkManager.NetworkManager.Version
'1.4.4'
>>> NetworkManager.NetworkManager.GetPermissions()
{'org.freedesktop.NetworkManager.checkpoint-rollback': 'auth',
 'org.freedesktop.NetworkManager.enable-disable-network': 'yes',
 ...}
# Must have a mainloop to use signals
>>> import dbus.mainloop.glib
>>> dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
>>> NetworkManager.Networkmanager.OnStateChanged(handle_state_change)
Source by pythonhosted.org #
 
PREVIOUS NEXT
Tagged: #python #networkmanager #tutorial
ADD COMMENT
Topic
Name
2+6 =