-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVirtualgui.py
729 lines (498 loc) · 34.4 KB
/
Virtualgui.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
#-----------------------IMPORTING MODULES-----------------------------------------------------------------------------------
# THIS INTENDATION HAS ALL THE NECESSARY MODULES WHICH ARE BEING USED. ALL THE
# MODULES USED ARE OPEN-SOURCE, SO THAT THERE ARE NOT ANY COPY WRITE CLAMES.
#-----------------------------------------------------------------------------------------------------------------------------------------
from tkinter import *
from tkinter import messagebox as mb
import pyttsx3
import random
from datetime import datetime
import wikipedia
import webbrowser
import os
import requests
#-----------------------------------------------------------------------------------------------------------------------------------------
#---------------------WIDGET CLASS----------------------------------------------------------------------------------------------------------------
# THIS IS THE MAIN AND ONLY CLASS OF THE APPLICATION AND ALSO THE MOST IMPORTANT ONE.
# IT HAS ALL THE NECESSARY FUCTIONS, LISTS, CONDITION AND INIT FUCTION.
#---------------------------------------------------------------------------------------------------------------------------------------------------------
class Widget():
#------------------------------------------------------KEY WORD LISTS---------------------------------------------------------------------------
# THESE ARE ALL THE LIST WHICH CONTAINS IMPORTANT KEYWORDS WHICH THE Bhagat CAN USE.
#--------------------------------------------------------------------------------------------------------------------------------------------------------
greet = ['Hey Whats up! How are you doing', 'Hello porkalai','Hi ! I am your Assistant','Hello, How can I help You']
how = ['I am Fine Sir, What about You','I am fine as always', 'what you think','just fine!!']
name = ['You Can call me ziva','My Name Is ziva','you named me ziva','You Should Know this, My name Is ziva']
creator = ['You made Me','I was Made by porkalai','One And only, porkalai','Best in the World, porkalai']
can = ['I Can Do Everything .','Just Give Me A Try And Figure This Out.','What you Coded Within Me ;) ','Your Choice']
c_un = ["I did'nt get that",'What You Said?','I was Unable To Understand','I have some Bugs Because of you']
here = ['To Help You Out','To Help You To Do Tasks','To Be Your Assistant','You Called me, Thatwise']
frd = ['I will Feel Lucky To Be Your Friend','Yaa Ofcource']
me = ['You Told Me Your Name, porkalai','I Think That\'s porkalai','Your Name That I Know Is Aditya']
thanks = ['My Pleasure','Welcome','Ohh Don\'t amberis me by saying thanks ','So Sweet!!']
#----------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------------------------------ABOUT US FUNCTION---------------------------------------------------------------------------------
def more(self):
more = Tk()
more.configure(bg='powder blue')
more.geometry('400x250+300+450')
Label(more, text='Ziva - The Virtual Assistant',bg='powder blue',font=('Arial Black',10,'bold')).pack()
Label(more, text='By: porkalai',bg='powder blue',font=('Arial Black',10,'bold')).pack()
out = 'My Name Is Ziva. I Was Created By porkalai. \n she Made Me Using Python Language. I Was Made\n As A Project For Her. But Later I Turned Really Well.\n So sHe Started Working Really Hard On Me. Her\n Progress In Me Was Just Great. So, Now I Am Her One\n Of The Dream Project Which sHe Is Planning\n To Build For Cross-Platform.'
Label(more, text=out,bg='powder blue',font=('Arial Black',10,'bold')).pack()
Label(more, text='Contact us at:\n9803588671',bg='powder blue',font=('Arial Black',10,'bold')).pack(side=LEFT)
Button(more, text='Narrate' ,font=('Arial Black',10,'bold'), command=lambda : self.speak(out)).pack(side=RIGHT,padx=10 )
more.mainloop()
#-----------------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------------------ENGINE FOR SPEAKING--------------------------------------------------------------
# THESE VARIABLES ARE BUILDING AN ENGINE WHICH THE SPEAK FUNCTION IS USING.
#-----------------------------------------------------------------------------------------------------------------------------
engine = pyttsx3.init('sapi5')
voices = engine.getProperty('voices')
engine.setProperty('voice', voices[0].id)
#------------------------------------------------------------------------------------------------------------------------------
#---------------------------PRINTING FUNC---------------------------------------------------
# THIS FUCTION PRINTS THE Bhagat'S RESPONCE TO SCREEN.
#---------------------------------------------------------------------------------------------------
def printing_func(self, out):
self.text_box2.delete(1.0,END)
self.text_box2.insert(INSERT, out)
#----------------------------------------------------------------------------------------------------
#-----------------SPEAK FUNCTION-------------------------------
# THIS FUNCTION SPEAKS THE Bhagat'S RESPONCE
#------------------------------------------------------------------------
def speak(self,s):
self.engine.say(s)
self.engine.runAndWait()
#----------------------------------------------------
#-----------------------SEND FUNC-----------------------------------------------------------------
# THIS FUCTION IS BEING USED TO SEND USER_INPUT TO Bhagat.
#--------------------------------------------------------------------------------------------------------
def send_func(self):
user_input = self.search_var.get().lower()
self.search_var.set('')
self.text_box1.delete(1.0,END)
self.text_box1.insert(INSERT,user_input)
#-------------------------------------------------------------------------------------------------------
#------------------------------------CONDITIONS------------------------------------------------------------------------------------------
# THESE ARE CONDITIONS WHICH THE Bhagat CHECKS. HE RESPOND TO THE MOST RELEVENT CONDITION.
#-------------------------------------------------------------------------------------------------------------------------------------------------
#----------------ABOUT CONDITION---------------------
if 'about' in user_input and 'you' in user_input:
out = 'Ok Let Me Introduce Myself.'
self.printing_func(out) #|
self.speak(out)
self.more()
#-----------------------------------------------------------------
#------YOU CONDITIONS ------------------------
elif 'you' in user_input: #|
if 'who' in user_input and 'are' in user_input:
r = random.randint(0,len(self.name)-1) #|
out = self.name[r] #|
self.printing_func(out) #|
self.speak(out)
elif 'how are' in user_input: #|
r = random.randint(0,len(self.how)-1) #|
out = self.how[r] #|
self.printing_func(out) #|
self.speak(out) #|
#|
elif 'who made' in user_input: #|
r = random.randint(0,len(self.creator)-1) #|
out = self.creator[r] #|
self.printing_func(out) #|
self.speak(out) #|
#|
elif 'do' in user_input: #|
r = random.randint(0,len(self.can)-1 ) #|
out = self.can[r] #|
self.printing_func(out) #|
self.speak(out) #|
#|
elif 'name' in user_input: #|
r = random.randint(0,len(self.name)-1) #|
out = self.name[r] #|
self.printing_func(out) #|
self.speak(out) #|
#|
elif 'open' in user_input: #|
out = 'Opening Youtube' #|
self.printing_func(out) #|
self.speak(out) #|
webbrowser.open('youtube.com') #|
elif 'here' in user_input:
r = random.randint(0,len(self.here)-1) #|
out = self.here[r] #|
self.printing_func(out) #|
self.speak(out)
else: #|
r = random.randint(0,len(self.c_un)-1) #|
out = self.c_un[r] #|
self.printing_func(out) #|
self.speak(out) #|
#---------------------------------------------------------------------------------------------------------------
#-----------------GURPARTAP CONDITION-------------------------------------------------------------------
elif 'ziva' in user_input:
out = 'ziva assistant Is A Good Friend Of porkalai. sHe is well Known as ziva' #|
self.printing_func(out) #|
self.speak(out)
#-----------------------------------------------------------------------------------------------------------------------
#----------------------------MY NAME CONDITION-----------------------------------------------------
elif 'who' in user_input and 'i' in user_input or 'my' in user_input and 'name' in user_input:
r = random.randint(0,len(self.me)-1) #|
out = self.me[r] #|
self.printing_func(out) #|
self.speak(out)
#---------------------------------------------------------------------------------------------------------------
#--------------------------THANKS CONDITION-------------------------------------------------------
elif 'thank' in user_input:
r = random.randint(0,len(self.thanks)-1) #|
out = self.thanks[r] #|
self.printing_func(out) #|
self.speak(out)
#-------------------------------------------------------------------------------------------------------------
#-----------------------------GOOD MORNING CONDITION--------------------------------------------------------------------------------
elif 'good morning' in user_input:
t = datetime.now().strftime('%H hours and %M minutes') #|
o= t.split()
if int(o[0]) > 12:
tt = int(o[0]) - 12
time = str(tt)+':'+str(o[3]+' PM')
else:
time = str(o[0])+':'+str(o[3]+' AM')
try:
url='http://api.openweathermap.org/data/2.5/weather?appid=0c42f7f6b53b244c78a418f4f181282a&q=Ludhiana'
json_data = requests.get(url).json()
format_add = json_data['weather'][0]['main']
format_temp = json_data['coord']['lat']
outa = f'Temperture In Your City is {format_temp} Deegre Celcius, And Climate is {format_add}'
except:
outa = ' Weather Forcast Is Currently Unavailable'
out = f'Good Morning porkalai, The Current Time is {time}, And {outa}, Have A Good Day mam.'
self.printing_func(out)
self.speak(out)
#--------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------USES-------------------------------------
elif 'can' in user_input and 'friend' in user_input:
r = random.randint(0,len(self.frd)-1) #|
out = self.frd[r] #|
self.printing_func(out) #|
self.speak(out)
#-----------------------------------------------------------
#--------------BORED--------------------------------------------------
elif 'bored' in user_input:
out = 'Shall I Play Some Music Or A Game, What You Think?'
self.printing_func(out) #|
self.speak(out)
#--------------------------------------------------------------------------
#-------------------------WEATHER FORCAST---------------------------------------------------------------------------------
elif 'weather' in user_input:
try:
if 'in' in user_input:
u = user_input.split()
for i in range(0,len(u)):
if u[i] == 'in':
city = u[i+1]
api='http://api.openweathermap.org/data/2.5/weather?appid=0c42f7f6b53b244c78a418f4f181282a&q='
url = api+city
json_data = requests.get(url).json()
format_add = json_data['weather'][0]['main']
format_temp = json_data['coord']['lat']
out = f'Temperture In {city} is {format_temp} Deegre Celcius, And Climate is {format_add}'
self.printing_func(out)
self.speak(out)
else:
url='http://api.openweathermap.org/data/2.5/weather?appid=0c42f7f6b53b244c78a418f4f181282a&q=Ludhiana'
json_data = requests.get(url).json()
format_add = json_data['weather'][0]['main']
format_temp = json_data['coord']['lat']
out = f'Temperture In Your city is {format_temp} Deegre Celcius, And Climate is {format_add}'
self.printing_func(out)
self.speak(out)
except:
out = 'I Was Unable To Connect To Internet.'
self.printing_func(out)
self.speak(out)
#----------------------------------------------------------------------------------------------------------------------------------------------
#-------------------------------------------LOCATION------------------------------------
elif 'where' in user_input and 'i' in user_input or 'location' in user_input:
try:
r = requests.get('https://ipinfo.io/')
d = r.text.split()[4]
out='You Location Is Near To ' + d
self.printing_func(out)
self.speak(out)
except:
out='I Was Unable To Track Your Location'
self.printing_func(out)
self.speak(out)
#------------------------------------------------------------------------------------------------
#-------HELLO CONDITION--------------------
elif 'hello' in user_input or 'hi' in user_input: #|
r = random.randint(0,len(self.greet)-1) #|
out = self.greet[r] #|
self.printing_func(out) #|
self.speak(out) #|
#-----------------------------------------------------
#----------EXIT CONDITION------------------------
elif 'exit' in user_input: #|
out = 'Okk I am going, Have a good Day mam' #|
self.printing_func(out) #|
self.speak(out) #|
self.win.destroy()
#|
#---------------------------------------------------------
#----------------OPEN CONDITIONS -----------------------------------------
elif 'open' in user_input:
if 'google' in user_input:
out = 'Opening Google'
self.printing_func(out)
self.speak(out)
webbrowser.open('google.com')
elif 'youtube' in user_input:
out = 'Opening Youtube'
self.printing_func(out)
self.speak(out)
webbrowser.open('youtube.com')
elif 'current' in user_input:
out='Opening Current Working Directory'
self.printing_func(out)
self.speak(out)
path = ''
os.startfile(path)
elif 'python' in user_input:
out='Opening Python'
self.printing_func(out)
self.speak(out)
path = r'C:\Users\DELL\AppData\Local\Programs\Python\Python38-32\python.exe'
os.startfile(path)
elif 'paint' in user_input:
out='Opening Paint'
self.printing_func(out)
self.speak(out)
path = r'C:\Windows\System32\mspaint.exe'
os.startfile(path)
elif 'wordpad' in user_input:
out='Opening WordPad'
self.printing_func(out)
self.speak(out)
path = r'C:\Program Files\Windows NT\Accessories\wordpad.exe'
os.startfile(path)
elif 'notepad' in user_input:
out='Opening Note Pad'
self.printing_func(out)
os.chdir(r'E:\EXE_FILES\Text_editor')
self.speak(out)
path = r'E:\EXE_FILES\Text_editor\Text_editor.exe'
os.startfile(path)
elif 'code language' in user_input:
out='Opening Code Language'
self.printing_func(out)
os.chdir(r'E:\EXE_FILES\CODE_LANGUAGE\V3.0')
self.speak(out)
path = r'E:\EXE_FILES\CODE_LANGUAGE\V3.0\CODE_LANGUAGE V3.0.exe'
os.startfile(path)
elif 'screenshot' in user_input:
out='Opening Screenshot'
self.printing_func(out)
self.speak(out)
path = r'"C:\Program Files\Take Screenshot\Take Screenshot.exe"'
os.startfile(path)
elif 'positioner' in user_input:
out='Opening Positioner'
self.printing_func(out)
self.speak(out)
path = r'E:\positioner.py'
os.startfile(path)
elif 'vlc' in user_input:
out = 'Opening VLC'
self.printing_func(out)
self.speak(out)
path = r'C:\Program Files\VideoLAN\VLC\vlc.exe'
os.startfile(path)
elif 'calculator' in user_input:
out = 'Opening Calculator'
self.printing_func(out)
os.chdir(r'E:\EXE_FILES\calculator')
self.speak(out)
path = r'E:\EXE_FILES\CALCULATOR\CALCULATOR v2.0.exe'
os.startfile(path)
elif 'sticky notes' in user_input:
out = 'Opening Sticky Notes'
self.printing_func(out)
os.chdir(r'E:\EXE_FILES')
self.speak(out)
path = r'E:\EXE_FILES\STICKY_NOTES.exe'
os.startfile(path)
elif 'browser' in user_input or 'chrome' in user_input:
out = 'Opening Crome Browser'
self.printing_func(out)
self.speak(out)
path = r'C:\Program Files\Google\Chrome\Application\chrome.exe'
os.startfile(path)
elif 'wo' in user_input and 'mic' in user_input:
out = 'Opening Wo Mic Client'
self.printing_func(out)
self.speak(out)
path = r"C:\Program Files\WOMic\WOMicClient.exe"
os.startfile(path)
elif 'vsc' in user_input:
out = 'Opening Visual Studio Code'
self.printing_func(out)
self.speak(out)
path = r"C:\Program Files\Microsoft VS Code\Code.exe"
os.startfile(path)
elif 'picture' in user_input or 'images' in user_input or 'photo' in user_input:
out = 'Opening Images'
self.printing_func(out)
self.speak(out)
path = r'C:\Users\DELL\Downloads\SSS.jpg'
os.startfile(path)
elif 'cmd' or 'command prompt' in user_input:
out='Opening Command Prompt'
self.printing_func(out)
self.speak(out)
path = r'C:\Windows\System32\cmd.exe'
os.startfile(path)
else: #|
r = random.randint(0,len(self.c_un)-1) #|
out = self.c_un[r] #|
self.printing_func(out) #|
self.speak(out) #|
#----------------------------------------------------------------------------------------------------------------------
#------------------------------MEDIA COMMANDS------------------------
elif 'music' in user_input:
try:
out='Playing Music'
self.printing_func(out)
self.speak(out)
mus_dir = r'D:\Top 20 Kuldeep Manak'
songs = os.listdir(mus_dir)
r = random.randint(0,len(mus_dir) - 1)
os.startfile(os.path.join(mus_dir,songs[r]))
except:
out='Playing Music'
self.printing_func(out)
self.speak(out)
mus_dir = r'D:\Top 20 Kuldeep Manak'
songs = os.listdir(mus_dir)
r = random.randint(0,len(mus_dir) - 1)
os.startfile(os.path.join(mus_dir,songs[r]))
elif 'movie' in user_input:
out='Playing Movies'
self.printing_func(out)
self.speak(out)
mov_dir = r'D:\movies'
songs = os.listdir(mov_dir)
r = random.randint(0,len(mov_dir) - 2)
os.startfile(os.path.join(mov_dir,songs[r]))
elif 'screenshot' in user_input:
out='Take ScreenShot'
self.printing_func(out)
self.speak(out)
path = r'C:\Windows\system32\SnippingTool.exe'
os.startfile(path)
elif 'my' in user_input and 'image' in user_input or 'photo' in user_input or 'picture' in user_input:
out='Opening Photos'
self.printing_func(out)
self.speak(out)
path = r'D:\photo\deep'
os.startfile(path)
#--------------------------------------------------------------------------------
#--------------GET LOST CONDITION--------------------------------
elif 'get' in user_input and 'lost' in user_input:
out = 'You Can\'t Talk To Me Like This \n I Am Going.'
self.printing_func(out)
self.speak(out)
self.win.destroy()
#-----------------------------------------------------------------------------
#--------------------NONE CONDITION----------------------------------
elif user_input == '':
out = 'You Said Nothing'
self.printing_func(out)
self.speak(out)
#-------------------------------------------------------------------------------
#---------------TIME CONDITION-----------------------------------------
elif 'time' in user_input: #|
t = datetime.now().strftime('%H hours and %M minutes') #|
o= t.split()
if int(o[0]) > 12:
tt = int(o[0]) - 12
time = str(tt)+':'+str(o[3]+' PM')
else:
time = str(o[0])+':'+str(o[3]+' AM')
out = 'Current time is : ' + time #|
self.printing_func(out) #|
self.speak(out) #|
#--------------------------------------------------------------------------------
#--------------------WIKIPEDIA CONDITION-----------------------------
elif 'wikipedia' in user_input: #|
i_l = list(user_input.split()) #|
i_l.remove('wikipedia') #|
to2 = ''.join(i_l) #|
try: #|
out = 'According To Wikipedia ' + wikipedia.summary(to2,2) #|
self.printing_func(out) #|
self.speak(out) #|
except: #|
out='cannot find' #|
self.printing_func(out) #|
self.speak(out) #|
#---------------------------------------------------------------------------------
#----------------------------FINE COMMAND-------------------------------
elif 'fine' in user_input:
out = 'Great'
self.printing_func(out) #|
self.speak(out)
#-----------------------------------------------------------------------------------
#----------------SHUTDOWN COMMAND----------------------------------------
elif 'shutdown' in user_input:
out='Shutting Down The System' #|
self.printing_func(out) #|
self.speak(out)
os.system('shutdown -s')
#-----------------------------------------------------------------------------------------
#-------------------ELSE CONDITION----------------------------------------
else: #|
to_search = user_input
out='I Can Search That On Google, May I?' #|
self.printing_func(out) #|
self.speak(out)
res = mb.askquestion('Google Search','May I Search That On Google.')
if res == 'yes':
out = 'Opening Google Search'
self.printing_func(out)
self.speak(out)
webbrowser.open('https://www.google.co.in/search?q=' + to_search)
else:
out = 'Ok mam!!'
self.printing_func(out)
self.speak(out)
#--------------------------------------------------------------------------------------
#----------------------------------------------------------------------------------
#------------------------------------------------------------------------------------------------------------------------------------
#----------------------------------------------------CONSTRUCTER FUNCTION---------------------------------------------------------
def __init__(self):
self.win = Tk()
self.win.geometry('380x300')
self.win.resizable(0,0)
self.win.configure(bg='orange')
Label(self.win, text='VIRTUAL ASSISTANT',font=('arial black',18),fg='white',width=30,bg='green',bd=5).pack()
Label(self.win, text='Me' , font=('arial black',20),fg='white',bg='orange').place(x=60,y=50)
Label(self.win, text='Ziva' , font=('arial black',20),fg='white',bg='orange').place(x=260,y=50)
self.text_box1 = Text(self.win, font=('arial black',13),width=16,height=5,fg='blue', wrap=WORD )
self.text_box1.place(x=10,y=100)
self.text_box2 = Text(self.win, font=('arial black',13),width=15,height=5,fg='orange', wrap=WORD)
self.text_box2.place(x=200,y=100)
self.search_var = StringVar()
Entry(self.win, font=('arial black', 14), width=18,textvariable=self.search_var,bd=5).place(x=10,y=250)
send = Button(self.win, text='Send', font=('arial black',10),bg='blue',fg='white',bd=5,width=10,command=self.send_func).place(x=270,y=250)
def enter(*args):
self.send_func()
self.win.bind('<Return>',enter)
self.win.mainloop()
#------------------------------------------------------------------------------------------------------------------------------------------
root = Widget()
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------
#--------------------------------------------------------------CODE FINISH------------------------------------------------------------------------------------
#--------------------------------------------------------------------------------------------------------------------------------------------------------------------