There are lots of errors in your code
Lots of tkinter object used in the code without importing tkinter, add the following import
def main(): FileDialogDemo().mainloop() if __name__ == "__main__" : main() sys.exit()#exits systemthese are indented into
class FileDialogDemo
remove the indentingself.__root.title(os.path.basement(self.__file)+"-TextEditor")
os
has not been importedfileName = tkinter.filedialog.askopenfilename(parent = self, filetypes = fList)
filedialog
has been imported directly so tkinter.
is not required in front of itrook = Tk() scrollbar = Scrollbar(root)typo
rook
instead of root
Lots of tkinter object used in the code without importing tkinter, add the following import
import tkinter as tkand then add
tk.
in front of all the tkinter objects