如何在搁置商店中共享tkinter小部件?
是否可以使用货架模块共享TKINTER小部件?
例如:
from tkinter import *
import shelve
tk = Tk()
with shelve.open("store") as holder:
holder["tk"] = tk
Is it possible to share a Tkinter widget using the shelve module?
For example:
from tkinter import *
import shelve
tk = Tk()
with shelve.open("store") as holder:
holder["tk"] = tk
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为它不会起作用。来自
搁架
文档:您无法用泡菜存储tkinter对象。
I don't think it will work. From the
shelve
documentation:You can't store tkinter objects with pickle.