python gui问题

tkinter怎么把pycharm打印框里面的内容显示在gui里?

用Tkinter打造GUI开发工具(43)Tkinter接管print输出语句
https://blog.csdn.net/hepu8/article/details/107003844


from Tkinter import *

def printSomething():
    # if you want the button to disappear:
    # button.destroy() or button.pack_forget()
    label = Label(root, text= "Hey whatsup bro, i am doing something very interresting.")
    #this creates a new label to the GUI
    label.pack() 

root = Tk()

button = Button(root, text="Print Me", command=printSomething) 
button.pack()

root.mainloop()