[Python] Tkinter를 활용한 Text Console 출력
import tkinter as tk import tkinter.font as tkFont root = tk.Tk() root.geometry( "500x440" ) " 창 사이즈 지정 " def getTextInput (): result=textExample.get( "1.0" , "end" ) print (result) textExample=tk.Text(root, height = 10 ) textExample.pack() fontExample = tkFont.Font( family = "Arial" , size = 16 , weight = "bold" , slant = "italic" ) "Font 변경 " textExample.configure( font =fontExample) btnRead=tk.Button(root, height = 1 , width = 10 , text = "Read" , command =getTextInput) btnRead.pack() root.mainloop()
댓글
댓글 쓰기