Re: Managing a connection using D-Bus API



On Thu, Jul 1, 2010 at 17:04, Ozan Çağlayan <ozan pardus org tr> wrote:
> On 01.07.2010 23:55, Daenyth Blank wrote:
>> On Thu, Jul 1, 2010 at 16:26, Ozan Çağlayan <ozan pardus org tr> wrote:
>>> On 01.07.2010 16:46, Daenyth Blank wrote:
>>>> Can you post a link to your current code? I should be able to help you
>>>> out or I can add something to the API if there's nothing workable
>>>> right now. It is a little incomplete but should be able to get what
>>>> you want.
>>>
>>> http://svn.pardus.org.tr/uludag/trunk/playground/intern/network-client/network
>> Cool! At work at the moment, but I'll see if I can look into this
>> later tonight. Just as an FYI, I do plan to change things around
>> internally because the class structure is pretty junky right now, but
>> I will try to keep breaking changes to a minimum and put some stuff
>> out for migration if there are any. I don't expect the NetworkManager
>> class to change much.
>
> Thanks for your interest :) I already packaged python-networkmanager and it's
> available through Pardus repositories. The API is clean, the nm-util.py is a
> very nice example. Actually, the first task of the student was to write a
> Python API around NM D-Bus interface until I've hit your binding when doing some
> preliminary research in Google. That saved us from reinventing the wheel.
>
> Regards,
>

Thanks! One thing I notice is that you'll want to use nm.devices_map()
in a few places rather than looping through nm.devices() and
organizing by type. You also can just do "for key in dict" rather than
"for key in dict.keys()".

Other than some minor style things, I don't really see anything too
bad with it. I do plan to change the DeviceType stuff so you don't
need those dicts all over... What's the issue you're currently running
into with it?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]