VitaminDude

Bad browser minimized

Aug 24th, 2026
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. #PRESS ENTER IN ADDRESS BAR
  2. #PRESS ENTER IN ADDRESS BAR
  3. #PRESS ENTER IN ADDRESS BAR
  4. import tkinter as tk
  5.  
  6. recheck=False
  7.  
  8. sample_tree=[
  9. ("namno.duckdns.org"),
  10. ("""Established 01 IV 2024"
  11. "Lina Inverse Rulez!"""),
  12. (""" ╱╲
  13. ╱ ╲
  14. ╱ ╲
  15. ▏ ▕ ▕
  16. ▏ ▕ ▕
  17. ╲ ╲ ╱
  18. ╱╲ ╲
  19. ▏ ╲ ╲
  20. ▏ ▕ ▕
  21. ▏ ▕ ▕
  22. ╲ ╱
  23. ╲ ╱
  24. ╲╱ """),
  25. ("My thoughts on various things"),
  26. ("""This site on runs on raspberry pi 1. It works without any sort of cooling right now, but I think it would be for the better if I stick radiator there.
  27. test test test
  28. You should be able to view this block of text all at once"""),
  29. ]
  30.  
  31. def view_document(event):
  32. global recheck
  33. for el in sample_tree:
  34. if recheck:
  35. break
  36. i=tk.Text(txfr, borderwidth=0, height=1, relief=tk.FLAT)#COMMENT HERE TO "FIX" the bug
  37. #i=tk.Text(fr, borderwidth=0, height=1, relief=tk.FLAT)#UNCOMMENT HERE TO "FIX" the bug
  38. #i=tk.Text(fr, borderwidth=0, relief=tk.FLAT)#UNCOMMENT THIS and comment previous line TO MAKE LINES BIG FOR NO REASON #UNCOMMENT HERE TO "FIX" the bug
  39. #i=tk.Text(txfr, borderwidth=0, relief=tk.FLAT)#UNCOMMENT THIS and comment previous line TO MAKE LINES BIG FOR NO REASON
  40. i.insert("end", el)
  41. textarray.append(i)
  42. print("=====================================")
  43. for i in textarray:
  44. logic_lines=i.count("1.1", "end", "lines", return_ints=True)
  45. print("LOGICAL LINES="+str(logic_lines))
  46. for j in range(1, logic_lines+1):
  47. print("LINE "+str(j)+": "+str(i.count(
  48. str(j)+".1",
  49. str(j)+".end",
  50. "update",
  51. "chars",
  52. "displaychars",
  53. "displayindices",
  54. "displaylines",
  55. "indices")))
  56. if recheck:
  57. continue
  58. i["state"]="disable"
  59. i.pack(expand=1, fill="both")
  60. recheck=True
  61.  
  62. w=tk.Tk()
  63. w.geometry("640x480")
  64. textarray=[]
  65.  
  66. fr=tk.Frame(w)
  67. #adress_var=tk.StringVar()
  68. #adress=tk.Entry(fr, justify="left",relief="sunken",textvariable=adress_var)
  69. adress=tk.Entry(fr, justify="left",relief="sunken")
  70. adress.pack(fill="x")
  71. adress.bind('<Return>', view_document )
  72.  
  73. canv=tk.Canvas(fr)#COMMENT HERE TO "FIX" the bug
  74. canv.pack(side="left", fill="both", expand=True)#COMMENT HERE TO "FIX" the bug
  75.  
  76. txfr=tk.Frame(canv)#COMMENT HERE TO "FIX" the bug
  77. canv.create_window((0, 0), window=txfr, anchor="nw", tags=("txfr"))#COMMENT HERE TO "FIX" the bug
  78.  
  79. #txfr=tk.Frame(fr)#UNCOMMENT HERE TO "FIX" the bug
  80.  
  81. fr.pack(fill="both", expand=True)
  82. #txfr.pack(fill="both", expand=True)#UNCOMMENT HERE TO "FIX" the bug
  83.  
  84. w.mainloop()
  85.  
Advertisement
Add Comment
Please, Sign In to add comment