-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (24 loc) · 798 Bytes
/
main.py
File metadata and controls
33 lines (24 loc) · 798 Bytes
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
from tkinter import Tk, Label, Entry, Button, messagebox
import cart_page as cart_page
def login():
user_id = input_id.get()
user_pw = input_pw.get()
if user_id == '20001234' and user_pw == '1234':
window.destroy()
cart_page.open_cart_page()
else:
messagebox.showerror("로그인 오류", "아이디 또는 비밀번호를 다시 확인해주세요.")
window = Tk()
window.title("로그인")
window.geometry("300x400")
label_id = Label(window, text="ID")
label_id.pack(pady=5)
input_id = Entry(window)
input_id.pack(pady=5)
label_pw = Label(window, text="Password")
label_pw.pack(pady=5)
input_pw = Entry(window, show="*")
input_pw.pack(pady=5)
login_button = Button(window, text="Login", command=login)
login_button.pack(pady=10)
window.mainloop()