-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsearch_applications.py
69 lines (56 loc) · 2 KB
/
search_applications.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This code is made by MRayan Asim
# Packages needed:
# pip install winapps
from tkinter import *
import winapps
# function to attach output
def app():
for item in winapps.search_installed(e.get()):
name.set(item.name)
version.set(item.version)
Install_date.set(item.install_date)
publisher.set(item.publisher)
uninstall_string.set(item.uninstall_string)
# object of tkinter
# and background set for grey
master = Tk()
master.configure(bg="light grey")
# Variable Classes in tkinter
name = StringVar()
version = StringVar()
Install_date = StringVar()
publisher = StringVar()
uninstall_string = StringVar()
# Creating label for each information
# name using widget Label
Label(master, text="Enter App name : ", bg="light grey").grid(row=0, sticky=W)
Label(master, text="Name : ", bg="light grey").grid(row=2, sticky=W)
Label(master, text="Version :", bg="light grey").grid(row=3, sticky=W)
Label(master, text="Install date :", bg="light grey").grid(row=4, sticky=W)
Label(master, text="publisher :", bg="light grey").grid(row=5, sticky=W)
Label(master, text="Uninstall string :", bg="light grey").grid(row=6, sticky=W)
# Creating label for class variable
# name using widget Entry
Label(master, text="", textvariable=name, bg="light grey").grid(
row=2, column=1, sticky=W
)
Label(master, text="", textvariable=version, bg="light grey").grid(
row=3, column=1, sticky=W
)
Label(master, text="", textvariable=Install_date, bg="light grey").grid(
row=4, column=1, sticky=W
)
Label(master, text="", textvariable=publisher, bg="light grey").grid(
row=5, column=1, sticky=W
)
Label(master, text="", textvariable=uninstall_string, bg="light grey").grid(
row=6, column=1, sticky=W
)
e = Entry(master, width=30)
e.grid(row=0, column=1)
# creating a button using the widget
b = Button(master, text="Show", command=app, bg="Blue")
b.grid(
row=0, column=2, columnspan=2, rowspan=2, padx=5, pady=5,
)
mainloop()