I'm trying to open a .txt file with Python. I'm trying to fill a Tkinter text widget with the files contents.
However with the following snippet, when I try to open the files contents and put it in a the text widget self.Te, nothing happens. Any clues?
Snippet:
self.Open = tkFileDialog.askopenfilename(initialdir='C:')
text_file = open(self.Open, "r")
# self.Te is a text widget
self.Te.insert('1.0', text_file.read())