Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(13)  |  Call(13)  |  Derive(0)  |  Import(0)

src/p/y/python-networkmanager-0.9.11/examples/activate_connection.py   python-networkmanager(Download)
ctype = conn.GetSettings()['connection']['type']
if ctype == 'vpn':
    for dev in NetworkManager.NetworkManager.GetDevices():
        if dev.State == NetworkManager.NM_DEVICE_STATE_ACTIVATED and dev.Managed:
            break
        'gsm': NetworkManager.NM_DEVICE_TYPE_MODEM,
    }.get(ctype,ctype)
    devices = NetworkManager.NetworkManager.GetDevices()
 
    for dev in devices:

src/p/y/python-networkmanager-HEAD/examples/activate_connection.py   python-networkmanager(Download)
ctype = conn.GetSettings()['connection']['type']
if ctype == 'vpn':
    for dev in NetworkManager.NetworkManager.GetDevices():
        if dev.State == NetworkManager.NM_DEVICE_STATE_ACTIVATED and dev.Managed:
            break
        'gsm': NetworkManager.NM_DEVICE_TYPE_MODEM,
    }.get(ctype,ctype)
    devices = NetworkManager.NetworkManager.GetDevices()
 
    for dev in devices:

src/p/y/python-networkmanager-0.9.11/examples/openvpn_over_ssh.py   python-networkmanager(Download)
 
# Activate VPN
for dev in NetworkManager.NetworkManager.GetDevices():
    if dev.State == NetworkManager.NM_DEVICE_STATE_ACTIVATED and dev.Managed:
        break

src/p/y/python-networkmanager-HEAD/examples/openvpn_over_ssh.py   python-networkmanager(Download)
 
# Activate VPN
for dev in NetworkManager.NetworkManager.GetDevices():
    if dev.State == NetworkManager.NM_DEVICE_STATE_ACTIVATED and dev.Managed:
        break

src/p/y/python-networkmanager-0.9.11/examples/info.py   python-networkmanager(Download)
print("Available network devices")
print("%-10s %-19s %-20s %s" % ("Name", "State", "Driver", "Managed?"))
for dev in NetworkManager.NetworkManager.GetDevices():
    print("%-10s %-19s %-20s %s" % (dev.Interface, c('device_state', dev.State), dev.Driver, dev.Managed))
 

src/p/y/python-networkmanager-HEAD/examples/info.py   python-networkmanager(Download)
print("Available network devices")
print("%-10s %-19s %-20s %s" % ("Name", "State", "Driver", "Managed?"))
for dev in NetworkManager.NetworkManager.GetDevices():
    print("%-10s %-19s %-20s %s" % (dev.Interface, c('device_state', dev.State), dev.Driver, dev.Managed))
 

src/w/e/wefree-HEAD/wefree/osabstraction.py   wefree(Download)
    def register_events(self, update_connected_state, refresh_menu_items):
        NetworkingBackend.register_events(self, update_connected_state, refresh_menu_items)
        for device in NetworkManager.NetworkManager.GetDevices():
            device.connect_to_signal("AccessPointAdded", refresh_menu_items)
            device.connect_to_signal("AccessPointRemoved", refresh_menu_items)
            device.connect_to_signal("StateChanged", self.device_state_changed, sender_keyword=device)
 
    def wifi_devices(self):
        all_devices = NetworkManager.NetworkManager.GetDevices()

src/w/e/wefree-HEAD/wefree/interfaces.py   wefree(Download)
    def get_signals(self):
        """Get the wifi signals."""
        all_devs = NetworkManager.NetworkManager.GetDevices()
        signals = []
        for device in all_devs:
    def connect_signals(self, refresh_menu_items, update_connected_state):
        self.update_connected_state = update_connected_state
        for device in NetworkManager.NetworkManager.GetDevices():
            device.connect_to_signal("AccessPointAdded", refresh_menu_items)
            device.connect_to_signal("AccessPointRemoved", refresh_menu_items)
            device.connect_to_signal("StateChanged", self.device_state_changed, sender_keyword=device)
 
    def force_rescan(self):
        for device in NetworkManager.NetworkManager.GetDevices():