parameters: ( self, prefix, template )
docstring: Creates a temporary workspace with a temporary root. 
              To be used with the "with" statement. Will clean up the temporary root and client
              workspace after the block has finished.
              The prefix is prepended to the workspace name and should be used in conjunction with
              the SpecMap of a spec depot to avoid creating entries there.
docstring_summary: Creates a temporary workspace with a temporary root. 
              To be used with the "with" statement. Will clean up the temporary root and client
              workspace after the block has finished.
              The prefix is prepended to the workspace name and should be used in conjunction with
              the SpecMap of a spec depot to avoid creating entries there.
docstring_tokens: Creates a temporary workspace with a temporary root . To be used with the with statement . Will clean up the temporary root and client workspace after the block has finished . The prefix is prepended to the workspace name and should be used in conjunction with the SpecMap of a spec depot to avoid creating entries there .
function: def temp_client( self, prefix, template ):
          """Creates a temporary workspace with a temporary root. 
              To be used with the "with" statement. Will clean up the temporary root and client
              workspace after the block has finished.
              The prefix is prepended to the workspace name and should be used in conjunction with
              the SpecMap of a spec depot to avoid creating entries there.
          """
  
          name = "{prefix}_{id}".format(prefix=prefix, id=str(uuid.uuid1()))
          ws = self.fetch_client('-t', template, name)
  
          try:
              root = tempfile.mkdtemp(prefix=prefix)
              ws._root = root
              self.save_client(ws)
  
              oldName = self.client
              self.client = name
              
              oldCwd = self.cwd
              self.cwd = root
              
              yield ws
  
              self.cwd = oldCwd
              self.client = oldName
              
          finally:
              self.delete_client(name)
              shutil.rmtree(root)
function_tokens: def temp_client ( self , prefix , template ) : name = "{prefix}_{id}" . format ( prefix = prefix , id = str ( uuid . uuid1 ( ) ) ) ws = self . fetch_client ( '-t' , template , name ) try : root = tempfile . mkdtemp ( prefix = prefix ) ws . _root = root self . save_client ( ws ) oldName = self . client self . client = name oldCwd = self . cwd self . cwd = root yield ws self . cwd = oldCwd self . client = oldName finally : self . delete_client ( name ) shutil . rmtree ( root )