-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgui.py
More file actions
65 lines (49 loc) · 1.51 KB
/
gui.py
File metadata and controls
65 lines (49 loc) · 1.51 KB
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
import Tkinter
import Image
import ImageTk
from Tkinter import Tk
from Tkinter import *
import os
#attendance.py Integrity! Offsite 11:30 Pings 40 50 17
master = Tk()
master.title("PyAttendance Gui")
master.iconbitmap(default='icon.ico')
master.minsize(width=300, height=100)
master.maxsize(width=1000, height=1000)
canvas = Canvas(width = 300, height = 100)
canvas.pack(expand = YES, fill = BOTH)
image = ImageTk.PhotoImage(file = "logo.gif")
canvas.create_image(20, 5, image = image, anchor = NW)
StatusLabel = Label(canvas, text="Status Name:")
StatusLabel.grid(row=0,column=0)
StatusLabel.pack()
status = Entry(canvas)
status.grid(row=0,column=1)
status.pack()
ReturnLabel = Label(canvas, text="Return Time:")
ReturnLabel.grid(row=1,column=0)
ReturnLabel.pack()
returntime = Entry(canvas)
returntime.grid(row=1,column=1)
returntime.pack()
InfoLabel = Label(canvas, text="Other Info:")
InfoLabel.grid(row=2,column=0)
InfoLabel.pack()
info = Entry(canvas)
info.grid(row=2,column=1)
info.pack()
NameLabel = Label(canvas, text="Student Name:")
NameLabel.grid(row=3,column=0)
NameLabel.pack()
studentname = Entry(canvas)
studentname.grid(row=3,column=1)
studentname.pack()
def callback():
output = str(status.get()) + " " + str(returntime.get()) + " " + str(info.get()) + " " + str(studentname.get())
print(output)
os.system("speak.py " + "'I think you said'" + output)
os.system("attendance.py " + "Bravery! " + output)
master.destroy()
b = Button(canvas, text="Go!", width=10, command=callback)
b.pack(pady=10)
mainloop()