try: from tkinter import * # Python 3.x except Import Error: from Tkinter import * # Python 2.x root = Tk() e = Entry(root) e.insert(END, 'default text') e.pack() root.mainloop()