def draw_screen(self, size, canvas):
        if not self.root:
            raise ManualShutdown("GUI window was closed")

        # enable changes
        self.text.config(state=tkinter.NORMAL)
        self.text.delete("1.0", tkinter.END)

        for idx, row in enumerate(canvas.content()):
            pos = 0
            for part in row:
                txt = part[2]
                if isinstance(txt, text_type):
                    strlen = len(txt)
                else:
                    strlen = len(txt.decode('utf8'))
                self.text.insert(tkinter.END, txt)
                if part[0] is not None:
                    self.text.tag_add(part[0], "%s.%s" % (idx + 1, pos), "%s.%s" % (idx + 1, pos + strlen))
                pos += strlen

            self.text.insert(tkinter.END, "\n")

        # disable changes
        self.text.config(state=tkinter.DISABLED)
        self.root.update()
Test the creation of a simple XlsxWriter file with image(s).
dataset/ETHPy150Open Blazemeter/taurus/bzt/modules/screen.py/GUIScreen.draw_screen--crossover with--dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/test/comparison/test_image_anchor02.py/TestCompareXLSXFiles.test_create_file_in_memory