Rawhide NetworkManager

Ray Strode rstrode at redhat.com
Wed Mar 23 16:37:27 UTC 2005


Hi Nils,
> import dbus
> 
> service = 'org.freedesktop.NetworkManager'
> object_path = "/org/freedesktop/NetworkManager/DhcpOptions"
> interface = "org.freedesktop.NetworkManager.DhcpOptions"
> 
> bus = dbus.Bus (dbus.Bus.TYPE_SYSTEM)
> NWM_service = bus.get_service (service)
> dhcpOptions = NWM_service.get_object (object_path, interface)
> --- >8 ---
> 
> but the resulting dhcpOptions options doesn't have many methods to begin
> with:
> 
> dhcpOptions: ['__doc__', '__getattr__', '__init__', '__module__',
> '_interface', '_object_path', '_service', 'connect_to_signal']
The python bindings to dbus don't know about methods ahead of time.  You
just have to call them and see what happens.
e.g.,
type = dhcpOptions.getType("NTP Servers")

--Ray





More information about the fedora-devel-list mailing list