cnetworkmanager rewrite
- From: Martin Vidner <mvidner suse cz>
- To: networkmanager-list gnome org
- Subject: cnetworkmanager rewrite
- Date: Tue, 21 Jul 2009 12:49:40 +0200
Hi,
in the spirit of releasing early, here is a preview of a rewrite of
cnetworkmanager that I'm working on.
Before:
#! /usr/bin/python
import dbus
bus = dbus.SystemBus()
NM = 'org.freedesktop.NetworkManager'
nm = bus.get_object(NM, '/org/freedesktop/NetworkManager')
for dev_opath in nm.GetDevices(dbus_interface = NM):
dev = bus.get_object(NM, dev_opath)
print dev.Get(NM + '.Device', 'Interface',
dbus_interface='org.freedesktop.DBus.Properties')
After:
#! /usr/bin/python
from networkmanager.networkmanager import NetworkManager
nm = NetworkManager()
for d in nm.GetDevices():
print d["Interface"]
Details, including git, at
http://mvidner.blogspot.com/2009/07/hackweek-networkmanager-python-library.html
--
Martin Vidner, YaST developer
http://en.opensuse.org/User:Mvidner
Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]