2024-09-29 17:19:36 发布
网友
当我编译这段代码时:
def compileF(): file = text.get('1.0', END) print(file) text = Text(root, height=40, width=60, fg="black", font="Helvetica 12")
我得到一个错误:
怎么回事?在
当然,变量是在使用后声明的,这正是Python所抱怨的。将顶层text赋值移到函数定义之前。在
text
当然,变量是在使用后声明的,这正是Python所抱怨的。将顶层
text
赋值移到函数定义之前。在相关问题 更多 >
编程相关推荐