-
[Python] tkinter 사용Engineering WIKI/Python 2019. 2. 14. 10:20# tkinter는 GUI에 대한 표준 Python 인터페이스이며 Window 창을 생성 할 수 있다.from tkinter import *
def printHello() :print('hi')
# 가장 상위 레벨의 윈도우 창을 생성root = Tk()
w = Label(root, text="Python Test")# command 에서 printHello 라는 함수를 호출 Lind Number 4b = Button(root, text="Hello Python!", command=printHello)# command에서 root.quit.로 윈도우창 종료c = Button(root, text="Quit", command=root.quit)
w.pack()b.pack()c.pack()# 윈도우 창을 윈도우가 종료될 때까지 실행 시킨다.root.mainloop()'Engineering WIKI > Python' 카테고리의 다른 글
[Python] shutil 함수 (0) 2019.07.03 [Python] 객체와 인스턴스의 차이 (0) 2019.07.03 [Python] 파이썬2,3 동시사용 (0) 2019.07.02 [Python] is 와 ==의 차이점 (0) 2019.05.30 [Python] string 모듈 (0) 2019.05.27 [Python] 2.7 Encoding 에러 해결 (0) 2019.01.26 [Python] 엑셀 코드(xlsx 파일 만들기) (0) 2018.10.15 [Python]Using Python file in Shell Script [ 쉘 스크립트 내에서 파이썬 프로그램 실행 ] (0) 2018.08.05