@memoize
def get_brew_path_prefix():
 try:
  return subprocess.check_output(['brew', '--prefix'], universal_newlines=True).strip()
 except:
  return None

@ memoize def get_brew_path_prefix ( ) : try : return subprocess . check_output ( [ 'brew' , '--prefix' ] , universal_newlines = True ) . strip ( ) except : return None
to get brew path .