// education

tkinter를 활용한 파이썬 데스크톱 GUI 프로그래밍

파이썬 표준 라이브러리로 기본 탑재되어 있는 그래픽 유저 인터페이스 모듈인 tkinter를 이용하여 데스크톱 GUI 프로그램 개발을 학습합니다.


1. GUI 핵심 용어 사전 (Glossary)


2. tkinter 간단한 GUI 창 생성 코드

import tkinter as tk
from tkinter import messagebox

def on_click():
    name = entry.get()
    messagebox.showinfo("환영", f"안녕하세요, {name}님! DAVHAVE GUI 앱에 오신 것을 환영합니다.")

# 메인 윈도우 생성
root = tk.Tk()
root.title("DAVHAVE Python GUI")
root.geometry("300x150")

# 위젯 배치
label = tk.Label(root, text="이름을 입력하세요:")
label.pack(pady=5)

entry = tk.Entry(root)
entry.pack(pady=5)

button = tk.Button(root, text="확인", command=on_click)
button.pack(pady=5)

# root.mainloop() # 메인 이벤트 루프 구동
← 이전파이썬 핵심 표준 라이브러리 (math, random, datetime, json, re) 다음 →파이썬 동시성 프로그래밍: threading, multiprocessing 및 asyncio