【发布时间】:2015-07-28 10:39:44
【问题描述】:
恐怕这是一个“如何做”的问题。我有一个从文本文件返回三个变量的函数。我想将它们“打印”到单独的标签字段中,以便我可以清楚地突出显示不同的信息。到目前为止,我只设法使用 .format 表示法将它们组合成一个返回语句。所以我想
return date, name, numeric_data
并且希望能够在 tinter GUI 中
label_name.configure( text = date)
label_name2.configure( text = name)
label_name3.configure(text = numeric_data)
目前,我只有:
output = read_clean_format.openfile() # which is return "{}{}{}".format(text,text,text)
version_result.configure(text = output)
这可能吗?我在哪里可以搜索信息。
【问题讨论】:
-
别担心。在stackoverflow.com/questions/9752958/… 上找到了(?)解决方案
标签: python-3.x tkinter multiple-variable-return