python - 我的文件仍在运行,但它不应该运行
问题描述
我试图在函数中导入文件,但它并没有停止运行。这是我的代码的一部分:
def imp():
root.withdraw() #"root" is the window I created earlier in the code
import file1 #some tkinter stuff
root.deiconify()
but=tk.Button(root,text='Run',command=imp)
but=pack(side=tk.BOTTOM)
在“file1.py”中点击按钮并关闭窗口后,“root”不会弹出。有谁知道为什么?我想不出办法解决它,请任何人帮忙。
对不起,如果我有什么不清楚的地方。
解决方案
推荐阅读
- r - R中的时间序列分析在循环上使用ARIMA模型来获得最优模型
- c# - 按钮在单击/按下时更改背景颜色
- laravel - laravel package development - 开发多个相互依赖的包
- python - 从 Python 创建动态 SQL 查询
- express - 无法验证中间件 JWT EXPRESS 中的令牌
- php - PHP不规则多级标题
- angular - 未捕获的 ReferenceError:sample_data 未在 Angular 7 中定义
- http - 在 IONIC 3 http.post 请求之间保留会话状态
- python - 如何从 Anaconda 环境(Python 3.7)构建 .exe 程序
- r - 提取R中第2个句点和第3个句点之间的字母