小编Gri*_*rie的帖子

不能腌制 _tkinter.tkapp 对象

问题在于我无法在输入字段中腌制文本。我尝试在“记录”功能中进行。

错误: can't pickle _tkinter.tkapp objects

我想将数据保存在文件中,然后读取它。

界面: 在此处输入图片说明

#program to record and store your sports results

import shelve
from tkinter import *

class Application(Frame):
    '''GUI application ??? displays menu for the programm'''
    def __init__(self, master):
        '''Initialize Frame'''
        super(Application, self).__init__(master)
        self.grid()
        self.create_widgets()

    def create_widgets(self):
        ''' Create widgets to get story information and to display story. '''

        self.fileDat = 'data'  

        # label date
        Label(self,
              text = "date:"
              ).grid(row = 0, column = 0, columnspan = 2, sticky = W)

        # field date …
Run Code Online (Sandbox Code Playgroud)

python tkinter

5
推荐指数
0
解决办法
6716
查看次数

标签 统计

python ×1

tkinter ×1