# =========================================================
# Tkinter Entry Widget
# From: effbot.org/tkinterbook/entry.htm
# =========================================================
# ---------------------------------------------------------
# --- import
# ---------------------------------------------------------
import sys
if sys.version_info.major is 3:
from tkinter import *
py3 = True
else:
from Tkinter import *
py3 = False
# ---------------------------------------------------------
# --- global variables
# ---------------------------------------------------------
buttonFont = ('arial', '15', 'bold')
entryFont = ('arial', '15')
otherFont = '-*-lucidatypewriter-medium-r-*-*-*-140-*-*-*-*-*-*'
# ---------------------------------------------------------
# --- functions
# ---------------------------------------------------------
def callback():
print e.get()
def quit():
sys.exit()
# ---------------------------------------------------------
# --- main
# ---------------------------------------------------------
master = Tk()
##e = Entry(master, font=entryFont)
e = Entry(master, font=otherFont)
e.pack()
e.focus_set()
g = Button(master, text='Get', width=10, font=buttonFont,
command=callback)
g.pack()
q = Button(master,text='Quit', font=buttonFont,
command=quit)
q.pack()
mainloop()