parameters: (self, target_name)
return_statement: return scratch_dir
docstring: Create a temporary scratch directory, and return its path.
  
          The scratch directory is generated inside the temp directory
          of this AutoInstaller instance.  This method also creates the
          temp directory if it does not already exist.
docstring_summary: Create a temporary scratch directory, and return its path.
docstring_tokens: Create a temporary scratch directory and return its path .
function: def _create_scratch_directory(self, target_name):
          """Create a temporary scratch directory, and return its path.
  
          The scratch directory is generated inside the temp directory
          of this AutoInstaller instance.  This method also creates the
          temp directory if it does not already exist.
  
          """
          prefix = target_name.replace(os.sep, "_") + "_"
          try:
              scratch_dir = self._create_scratch_directory_inner(prefix)
          except OSError:
              # Handle case of containing temp directory not existing--
              # OSError: [Errno 2] No such file or directory:...
              temp_dir = self._temp_dir
              if temp_dir is None or os.path.exists(temp_dir):
                  raise
              # Else try again after creating the temp directory.
              os.makedirs(temp_dir)
              scratch_dir = self._create_scratch_directory_inner(prefix)
  
          return scratch_dir
function_tokens: def _create_scratch_directory ( self , target_name ) : prefix = target_name . replace ( os . sep , "_" ) + "_" try : scratch_dir = self . _create_scratch_directory_inner ( prefix ) except OSError : # Handle case of containing temp directory not existing-- # OSError: [Errno 2] No such file or directory:... temp_dir = self . _temp_dir if temp_dir is None or os . path . exists ( temp_dir ) : raise # Else try again after creating the temp directory. os . makedirs ( temp_dir ) scratch_dir = self . _create_scratch_directory_inner ( prefix ) return scratch_dir