Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- from tkinter import filedialog
- root = tk.Tk()
- root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select ",filetypes = (("txt files","*.txt"),("all files","*.*")))
- print (root.filename)
- file = root.filename
- file_2 = open(file, "r")
- print(file_2)
- msg_box = tk.Label(root, bg="white", text = file_2)
- msg_box.grid()
- frame = tk.Frame(root, bg="black")
- frame.grid()
- words_label = tk.Label(root, bg="white")
- words_label.grid(row=3, sticky="w")
- impact_label = tk.Label(root, bg="white")
- impact_label.grid(row=4, sticky="w")
- character_label = tk.Label(root, bg="white")
- character_label.grid(row=5, sticky="w")
- character_frequency_label = tk.Label(root, bg="white")
- character_frequency_label.grid(row=6, sticky="w")
- word_frequency_label = tk.Label(root, bg="white")
- word_frequency_label.grid(row=7, sticky="w")
- average_word_lenght_label = tk.Label(root, bg="white", text=)
- average_word_lenght_label.grid(row=8, sticky="w")
- root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement