def _load_libzmq():
 import sys, ctypes, platform
 dlopen = hasattr(sys, 'getdlopenflags')
 if dlopen:
  dlflags = sys.getdlopenflags()
  sys.setdlopenflags((ctypes.RTLD_GLOBAL | dlflags))
 try:
  from . import libzmq
 except ImportError:
  pass
 else:
  globals()['_libzmq'] = libzmq
  if (platform.python_implementation().lower() == 'pypy'):
   ctypes.CDLL(libzmq.__file__, ctypes.RTLD_GLOBAL)
 finally:
  if dlopen:
   sys.setdlopenflags(dlflags)

def _load_libzmq ( ) : import sys , ctypes , platform dlopen = hasattr ( sys , 'getdlopenflags' ) if dlopen : dlflags = sys . getdlopenflags ( ) sys . setdlopenflags ( ( ctypes . RTLD_GLOBAL | dlflags ) ) try : from . import libzmq except ImportError : pass else : globals ( ) [ '_libzmq' ] = libzmq if ( platform . python_implementation ( ) . lower ( ) == 'pypy' ) : ctypes . CDLL ( libzmq . __file__ , ctypes . RTLD_GLOBAL ) finally : if dlopen : sys . setdlopenflags ( dlflags )
load bundled libzmq if there is one .