찐s/Raspberry Pi

[RPi] Lab.05-2: GUI (tkinter)

jjin bbang 2021. 7. 17. 23:06

라즈베리파이에서 GUI 프로그래밍을 실습한다.

 

[tk_begin.py]

# tk_begin.py
import tkinter as tk
from tkinter import ttk

# Create instance
win = tk.Tk()

# Add a Title
win.title('RaspberryPI GUI ')

# Add a Label
ttk.Label(win, text='Hello RaspberryPI ').grid(column=1, row=1)

# Start GUI
win.mainloop()

 

$ python3 tk_begin.py

 

[참조]

www.raspberrypi.org

 

반응형