def FindPythonExe(exeAlias, possibleRealNames, searchPaths):
 import win32api, regutil, string, os, sys
 if (possibleRealNames is None):
  possibleRealNames = exeAlias
 found = os.path.join(sys.prefix, possibleRealNames)
 if (not FileExists(found)):
  found = os.path.join(sys.prefix, 'PCBuild', possibleRealNames)
 if (not FileExists(found)):
  found = LocateFileName(possibleRealNames, searchPaths)
 registered_ok = 0
 try:
  registered = win32api.RegQueryValue(regutil.GetRootKey(), ((regutil.GetAppPathsKey() + '\\') + exeAlias))
  registered_ok = (found == registered)
 except win32api.error:
  pass
 return (found, registered_ok)

def FindPythonExe ( exeAlias , possibleRealNames , searchPaths ) : import win32api , regutil , string , os , sys if ( possibleRealNames is None ) : possibleRealNames = exeAlias found = os . path . join ( sys . prefix , possibleRealNames ) if ( not FileExists ( found ) ) : found = os . path . join ( sys . prefix , 'PCBuild' , possibleRealNames ) if ( not FileExists ( found ) ) : found = LocateFileName ( possibleRealNames , searchPaths ) registered_ok = 0 try : registered = win32api . RegQueryValue ( regutil . GetRootKey ( ) , ( ( regutil . GetAppPathsKey ( ) + '\\' ) + exeAlias ) ) registered_ok = ( found == registered ) except win32api . error : pass return ( found , registered_ok )
find an exe .