Advertisement
Guest User

EPR_06

a guest
Jan 18th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. import tkinter as tk
  2. from tkinter import filedialog
  3.  
  4.  
  5.  
  6. root = tk.Tk()
  7. root.filename = filedialog.askopenfilename(initialdir = "/",title = "Select ",filetypes = (("txt files","*.txt"),("all files","*.*")))
  8. print (root.filename)
  9.  
  10. file = root.filename
  11.  
  12. file_2 = open(file, "r")
  13. print(file_2)
  14.  
  15.  
  16. msg_box = tk.Label(root, bg="white", text = file_2)
  17. msg_box.grid()
  18.  
  19. frame = tk.Frame(root, bg="black")
  20. frame.grid()
  21.  
  22. words_label = tk.Label(root, bg="white")
  23. words_label.grid(row=3, sticky="w")
  24.  
  25. impact_label = tk.Label(root, bg="white")
  26. impact_label.grid(row=4, sticky="w")
  27.  
  28. character_label = tk.Label(root, bg="white")
  29. character_label.grid(row=5, sticky="w")
  30.  
  31. character_frequency_label = tk.Label(root, bg="white")
  32. character_frequency_label.grid(row=6, sticky="w")
  33.  
  34. word_frequency_label = tk.Label(root, bg="white")
  35. word_frequency_label.grid(row=7, sticky="w")
  36.  
  37. average_word_lenght_label = tk.Label(root, bg="white", text=)
  38. average_word_lenght_label.grid(row=8, sticky="w")
  39.  
  40. root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement