Total Complexity | 0 |
Total Lines | 17 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import tkinter as tk |
||
2 | from tkinter import Label, messagebox |
||
3 | |||
4 | root = tk.Tk() |
||
5 | root.title("WhatsApp History") |
||
6 | root.iconbitmap("assets/youtubedownloader.ico") |
||
7 | root.geometry("200x400+840+100") |
||
8 | root.resizable(0,0) |
||
9 | try: |
||
10 | with open("pywhatkit_txtfile.txt", "r") as f: |
||
11 | Label(root, text=f.read()).pack() |
||
12 | except FileNotFoundError: |
||
13 | messagebox.showinfo("WhatsApp History.", |
||
14 | "No History found.") |
||
15 | |||
16 | root.mainloop() |
||
17 |