parameters: (dir, pre, suf, flags)
docstring: Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.
docstring_summary: Code common to mkstemp, TemporaryFile, and NamedTemporaryFile.
docstring_tokens: Code common to mkstemp TemporaryFile and NamedTemporaryFile .
function: def _mkstemp_inner(dir, pre, suf, flags):
      """Code common to mkstemp, TemporaryFile, and NamedTemporaryFile."""
  
      names = _get_candidate_names()
  
      for seq in xrange(TMP_MAX):
          name = names.next()
          file = _os.path.join(dir, pre + name + suf)
          try:
              fd = _os.open(file, flags, 0600)
              _set_cloexec(fd)
              return (fd, _os.path.abspath(file))
          except OSError, e:
              if e.errno == _errno.EEXIST:
                  continue # try again
              raise
  
      raise IOError, (_errno.EEXIST, "No usable temporary file name found")
function_tokens: def _mkstemp_inner ( dir , pre , suf , flags ) : names = _get_candidate_names ( ) for seq in xrange ( TMP_MAX ) : name = names . next ( ) file = _os . path . join ( dir , pre + name + suf ) try : fd = _os . open ( file , flags , 0600 ) _set_cloexec ( fd ) return ( fd , _os . path . abspath ( file ) ) except OSError , e : if e . errno == _errno . EEXIST : continue # try again raise raise IOError , ( _errno . EEXIST , "No usable temporary file name found" )