def get_xmlsec_binary(paths=None):
 if (os.name == 'posix'):
  bin_name = ['xmlsec1']
 elif (os.name == 'nt'):
  bin_name = ['xmlsec.exe', 'xmlsec1.exe']
 else:
  bin_name = ['xmlsec1']
 if paths:
  for bname in bin_name:
   for path in paths:
    fil = os.path.join(path, bname)
    try:
     if os.lstat(fil):
      return fil
    except OSError:
     pass
 for path in os.environ['PATH'].split(os.pathsep):
  for bname in bin_name:
   fil = os.path.join(path, bname)
   try:
    if os.lstat(fil):
     return fil
   except OSError:
    pass
 raise SigverError(("Can't find %s" % bin_name))

def get_xmlsec_binary ( paths = None ) : if ( os . name == 'posix' ) : bin_name = [ 'xmlsec1' ] elif ( os . name == 'nt' ) : bin_name = [ 'xmlsec.exe' , 'xmlsec1.exe' ] else : bin_name = [ 'xmlsec1' ] if paths : for bname in bin_name : for path in paths : fil = os . path . join ( path , bname ) try : if os . lstat ( fil ) : return fil except OSError : pass for path in os . environ [ 'PATH' ] . split ( os . pathsep ) : for bname in bin_name : fil = os . path . join ( path , bname ) try : if os . lstat ( fil ) : return fil except OSError : pass raise SigverError ( ( "Can't find %s" % bin_name ) )
tries to find the xmlsec1 binary .