from Tkinter import *
from tkFileDialog import askopenfilename
from tkFileDialog import asksaveasfilename
def OpenFile():
name = askopenfilename()
with file(name) as f:
T.insert(END,f.read())
def SaveFileAs():
name = asksaveasfilename()
a = open(name, 'w')
a.write(T.get('1.0', 'end'))
#Create Menu
root = Tk()
menu = Menu(root)
root.config(menu=menu)
#File Menu
filemenu = Menu(menu)
menu.add_cascade(label="File", menu=filemenu)
filemenu.add_command(label="Open", command=OpenFile)
filemenu.add_command(label="Save As", command=SaveFileAs)
#Create Text Box
T = Text(root,height=50, width=100)
T.pack()
#Main
root.mainloop()