def DNSServiceBrowse(flags=0, interfaceIndex=kDNSServiceInterfaceIndexAny, regtype=_NO_DEFAULT, domain=None, callBack=None):
 _NO_DEFAULT.check(regtype)
 @_DNSServiceBrowseReply
 def _callback(sdRef, flags, interfaceIndex, errorCode, serviceName, regtype, replyDomain, context):
  if (callBack is not None):
   callBack(sdRef, flags, interfaceIndex, errorCode, serviceName.decode(), regtype.decode(), replyDomain.decode())
 _global_lock.acquire()
 try:
  sdRef = _DNSServiceBrowse(flags, interfaceIndex, regtype, domain, _callback, None)
 finally:
  _global_lock.release()
 sdRef._add_callback(_callback)
 return sdRef

def DNSServiceBrowse ( flags = 0 , interfaceIndex = kDNSServiceInterfaceIndexAny , regtype = _NO_DEFAULT , domain = None , callBack = None ) : _NO_DEFAULT . check ( regtype ) @ _DNSServiceBrowseReply def _callback ( sdRef , flags , interfaceIndex , errorCode , serviceName , regtype , replyDomain , context ) : if ( callBack is not None ) : callBack ( sdRef , flags , interfaceIndex , errorCode , serviceName . decode ( ) , regtype . decode ( ) , replyDomain . decode ( ) ) _global_lock . acquire ( ) try : sdRef = _DNSServiceBrowse ( flags , interfaceIndex , regtype , domain , _callback , None ) finally : _global_lock . release ( ) sdRef . _add_callback ( _callback ) return sdRef
browse for instances of a service .