from tkinter import *
import tkFileDialog
def LoadFile(ev):
fn = tkFileDialog.Open(root, filetypes=[('*.txt files', '.txt')]).show()
if fn == '':
return
textbox.delete('1.0', 'end')
textbox.insert('1.0', open(fn, 'rt').read())