code: def python_executable(check=True, short=False):
      r
      if not check:
          python_exe = 'python'
      else:
          from os.path import isdir
          python_exe_long = unixpath(sys.executable)
          python_exe = python_exe_long
          if short:
              python_exe_short = basename(python_exe_long)
              found = search_env_paths(python_exe_short, key_list=['PATH'],
                                       verbose=False)
              found = [f for f in found if not isdir(f)]
              if len(found) > 0:
                  if found[0] == python_exe_long:
                      # Safe to use the short name in this env
                      python_exe = python_exe_short
      return python_exe
docs: r"""
      Args:
          short (bool): (default = False)
  
      Returns:
          str:
  
      Example:
          >>> # ENABLE_DOCTEST
          >>> from utool.util_cplat import *  # NOQA
          >>> short = False
          >>> result = python_executable(short)
          >>> print(result)