[avahi] example python script

Trent Lloyd lathiat at bur.st
Tue May 8 18:33:47 PDT 2007


Howdy,

Jeremy Wilkins wrote:
> Hi All,
>
> Is there a super simple (ideally command line) python script I can use
> as an example for querying the avahi daemon.
>
> I'm trying to write a simple python script which will give me a list
> of ssh servers on my local network. I've had a look at avahi-discover
> but I'm not particularly familiar with either pygtk or dbus and trying
> to split out the code I need isn't proving very successful.
Also check out this:
http://www.avahi.org/browser/tags/release-0.5.2/avahi-utils/avahi-browse.in

This is a fairly complete example, however we have since added the 
'flags' paramater to a couple calls, so double check the D-Bus API docs 
at http://avahi.org/wiki/ProgrammingDocs for where to put any 'flags' 
paramaters

 From memory ServiceBrowserNew & ResolveService require flags.

Cheers,
Trent
>
> thanks
>
> jeb
> _______________________________________________
> avahi mailing list
> avahi at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/avahi
>



More information about the avahi mailing list