라즈베리파이에서 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
[참조]
'찐s > Raspberry Pi' 카테고리의 다른 글
[RPi] Lab.05-4: GUI (tkinter) (0) | 2021.09.25 |
---|---|
[RPi] Lab.05-3: GUI (tkinter) (0) | 2021.08.29 |
[RPi] Lab.05-1: GUI (matplotlib) (0) | 2021.07.03 |
[RPi] Lab.04-4: piCamera (0) | 2020.12.13 |