def _render_frame(self):
        """Renders the frame on the line after clearing it.
        """
        if not self.enabled:
            # in case we're disabled or stream is closed while still rendering,
            # we render the frame and increment the frame index, so the proper
            # frame is rendered if we're reenabled or the stream opens again.
            return

        self.clear()
        frame = self.frame()
        output = "\r{}".format(frame)
        try:
            self._write(output)
        except UnicodeEncodeError:
            self._write(encode_utf_8_text(output))
Renders the frame on the line after clearing it.
        
halo/halo.py