def resolve_interpreter(exe):
 orig_exe = exe
 python_versions = get_installed_pythons()
 if (exe in python_versions):
  exe = python_versions[exe]
 if (os.path.abspath(exe) != exe):
  paths = os.environ.get('PATH', '').split(os.pathsep)
  for path in paths:
   if os.path.exists(join(path, exe)):
    exe = join(path, exe)
    break
 if (not os.path.exists(exe)):
  logger.fatal(('The path %s (from --python=%s) does not exist' % (exe, orig_exe)))
  raise SystemExit(3)
 if (not is_executable(exe)):
  logger.fatal(('The path %s (from --python=%s) is not an executable file' % (exe, orig_exe)))
  raise SystemExit(3)
 return exe

def resolve_interpreter ( exe ) : orig_exe = exe python_versions = get_installed_pythons ( ) if ( exe in python_versions ) : exe = python_versions [ exe ] if ( os . path . abspath ( exe ) != exe ) : paths = os . environ . get ( 'PATH' , '' ) . split ( os . pathsep ) for path in paths : if os . path . exists ( join ( path , exe ) ) : exe = join ( path , exe ) break if ( not os . path . exists ( exe ) ) : logger . fatal ( ( 'The path %s (from --python=%s) does not exist' % ( exe , orig_exe ) ) ) raise SystemExit ( 3 ) if ( not is_executable ( exe ) ) : logger . fatal ( ( 'The path %s (from --python=%s) is not an executable file' % ( exe , orig_exe ) ) ) raise SystemExit ( 3 ) return exe
if the executable given isnt an absolute path .