Toolkit
About

Users

Developers

Python Bonjour Interface

About

Bonjour provides service advertising and discovery on the
local network via multicast DNS.  These files use SWIG to
provide a Python interface for use by applications to interact
with Bonjour. 

Requirements

  • Swig 1.3 (earlier versions may work, too)
  • Bonjour (http://developer.apple.com/bonjour)
  • OSX - Included in 10.3 and later
  • Windows - Install two packages:
    • Bonjour for Windows
    • Bonjour SDK for Windows
  • Linux - Build and install the mDNSResponder project from cvs.

Building

To build and install the Python module:

You need to have swig in your path.  On Windows, you'll need to be running in a VisualStudio command-shell, or have the relevant environment variables set.  If you're using a VisualStudio newer than that which was used to build Python, you must set the MSVC_VERSION environment variable to your version number (e.g., 71 for .NET 2003).

You must have the mdns responder running in order for tests and general operation to work. 

  • OSX
    Included in OS, nothing to do.
  • Windows
    The "Apple mDNSResponder" service will be installed and started by the Technology Preview installation.
  • Linux
    mdns script will be installed with package.  It should be started, or preferably made to start at boot.

Tests, Examples

  • test.py
    registers a service, and then browses for services of that type, succeeding
    when it finds the one it registered.
  • register.py
    standalone service registration

  • browse.py
    standalone service browsing

  • query.py
    standalone service meta query
  • wxBrowse.py
    graphical service browser


Contact

Issues with this work should be addressed to ag-info@mcs.anl.gov.


 

For more information: ag-info@mcs.anl.gov