(filename, installsubdir=None, env="ProgramFiles")
return path
Find executable in current dir, system path or given ProgramFiles subdir
Find executable in current dir, system path or given ProgramFiles subdir
Find executable in current dir system path or given ProgramFiles subdir
def win_find_exe(filename, installsubdir=None, env="ProgramFiles"):
    """Find executable in current dir, system path or given ProgramFiles subdir"""
    for fn in [filename, filename+".exe"]:
        try:
            if installsubdir is None:
                path = _where(fn)
            else:
                path = _where(fn, dirs=[os.path.join(os.environ[env], installsubdir)])
        except IOError:
            path = filename
        else:
            break        
    return path
def win_find_exe ( filename , installsubdir = None , env = "ProgramFiles" ) : for fn in [ filename , filename + ".exe" ] : try : if installsubdir is None : path = _where ( fn ) else : path = _where ( fn , dirs = [ os . path . join ( os . environ [ env ] , installsubdir ) ] ) except IOError : path = filename else : break return path