需要一个整数(得到类型str)

时间:2017-07-03 18:58:55

标签: python python-3.x file-io tkinter

所以我在tkinter中制作工具栏,并且不知道这段代码有什么问题(我只发布了最重要的事情)。我搜索了溶剂,但没找到。

编辑: 但exFunc需要两个字符串

from tkinter import *    

def exFunc(x, y):
    with open("config.txt", "w") as file:
        pass

buttonName = Button(command= lambda: exFunc(1Entry.get(), 2Entry.get()))

#1Entry and 2Entry are just tkinter entries

1 个答案:

答案 0 :(得分:0)

Authentication默认返回一个字符串。您可以使用get()函数将其转换为整数:

int