Python Bonjour Interface


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. 


  • Swig 1.3 (earlier versions may work, too)
  • 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.


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

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

    standalone service browsing

    standalone service meta query
    graphical service browser


Issues with this work should be addressed to [email protected].


For more information: [email protected]