-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgui.py
63 lines (48 loc) · 1.19 KB
/
gui.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
from appJar import gui
import subprocess
import sys
def open_cmd(args):
if sys.platform == 'win32':
command = 'start cmd /k'
for arg in args:
command += " " + arg
subprocess.call(command, shell = True)
def parse_complete():
pass
def parse_checker():
args = ['python', '-u', 'web_diff.py']
link = app.getEntry('Website')
if(link):
args.append(link)
if(app.getCheckBox('-r')):
args.append('-r')
if(app.getCheckBox('-o')):
args.append('-o')
if(app.getCheckBox('-t')):
args.append('-t')
time_nr = app.getEntry('Time')
if(time_nr):
args.append(time_nr)
if(app.getCheckBox('-w')):
args.append('-w')
if(app.getCheckBox('-v')):
args.append('-v')
open_cmd(args)
def parse_check(button):
app.threadCallback(parse_checker, parse_complete)
app = gui("web_diff gui", "500x500")
app.setLocation("CENTER")
app.setBg("SteelBlue")
app.setFont(15)
app.setResizable(False)
app.addLabelEntry("Website",0,0,4)
app.addCheckBox("-r",1,0)
app.addCheckBox("-o",1,1)
app.addCheckBox("-t",1,2)
app.addLabelEntry("Time",1,3)
app.setEntryDefault("Time", 60)
app.addCheckBox("-w",2,0)
app.addCheckBox("-v",2,1)
app.addButton("Check", parse_check, 3,1)
app.setFocus("Website")
app.go()