def _get_tmp():
 userdir = os.path.expanduser('~')
 for testdir in [tempfile.gettempdir(), os.path.join(userdir, '.cache'), os.path.join(userdir, '.tmp'), userdir]:
  if ((not os.path.exists(testdir)) or (not (_run_shell_command('echo success', testdir) == 'success'))):
   continue
  return testdir
 return ''

def _get_tmp ( ) : userdir = os . path . expanduser ( '~' ) for testdir in [ tempfile . gettempdir ( ) , os . path . join ( userdir , '.cache' ) , os . path . join ( userdir , '.tmp' ) , userdir ] : if ( ( not os . path . exists ( testdir ) ) or ( not ( _run_shell_command ( 'echo success' , testdir ) == 'success' ) ) ) : continue return testdir return ''
find an executable tmp directory .