def find_exe(exename):
 warnings.warn('deprecated', DeprecationWarning)
 exes = which(exename)
 exe = (exes and exes[0])
 if (not exe):
  exe = os.path.join(sys.prefix, 'scripts', (exename + '.py'))
 if os.path.exists(exe):
  (path, ext) = os.path.splitext(exe)
  if (ext.lower() in ['.exe', '.bat']):
   cmd = [exe]
  else:
   cmd = [sys.executable, exe]
  return cmd
 else:
  return False

def find_exe ( exename ) : warnings . warn ( 'deprecated' , DeprecationWarning ) exes = which ( exename ) exe = ( exes and exes [ 0 ] ) if ( not exe ) : exe = os . path . join ( sys . prefix , 'scripts' , ( exename + '.py' ) ) if os . path . exists ( exe ) : ( path , ext ) = os . path . splitext ( exe ) if ( ext . lower ( ) in [ '.exe' , '.bat' ] ) : cmd = [ exe ] else : cmd = [ sys . executable , exe ] return cmd else : return False
look for something named exename or exename + " .