Re: cnetworkmanager rewrite
- From: Dan Williams <dcbw redhat com>
- To: Martin Vidner <mvidner suse cz>
- Cc: networkmanager-list gnome org
- Subject: Re: cnetworkmanager rewrite
- Date: Thu, 23 Jul 2009 14:38:42 -0400
On Tue, 2009-07-21 at 12:49 +0200, Martin Vidner wrote:
> 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
Cool! The Sugar people might be interested in this too.
Dan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]