我在我的IDE和Tkinter窗口中的python shell之间有问题。我想要做的是将所有的用户输入到shell中,然后我想在Tkinter窗口中输出相应的信息。Python Tkinter窗口输出和Shell输入
但是,当我的窗口被创建并弹出时,我关闭它以在shell中继续我的程序,然后继续输入。但是,当我尝试重新初始化我的窗口。它说窗户已经被毁坏了。我明白这意味着什么,所以我尝试了一个Toplevel窗口,在那里输出可以关闭的信息,并隐藏我的根窗口,但是在我关闭/销毁根窗口之前,shell将不会继续。
有没有一种方法可以在不破坏我的根窗口的情况下在shell中继续?我对这种语言相当陌生,所以任何帮助将非常感激。
这是我的总体思路:
from Tkinter import *
#get all my info from the shell
root = Tk()
root.withdraw() #hide the root window
main = Toplevel()
#this is the window that I want to be able to close and open later
#get more info from the shell after main is closed
#now I want to open the updated main window
提前感谢! (而且我在Windows上工作,如果该事项)