from Tkinter import * def displayText(text): root = Tk() textw = Text(root,background = "LightBlue", font = "Times 12") textw.pack() textw.insert(INSERT, text) if __name__ == "__main__": displayText("This is a test.")