def update_prompt(self):
        """ Update the prompt """
        prefix = ""
        if self._local_endpoint is not None:
            prefix += "(%s:%d) " % self._local_endpoint
        prefix += self.engine.region
        if self.engine.partial:
            self.prompt = len(prefix) * " " + "> "
        else:
            self.prompt = prefix + "> "
Update the prompt