【发布时间】:2019-02-22 04:13:23
【问题描述】:
我正在尝试通过 tkinter 文本小部件获取输入。我看到了关于 tkinter 文本小部件输入的帖子。但那些对我不起作用。我在 上看到了帖子并尝试过,但我不明白它有什么问题。这是我的代码。
`corpusinput = Text(rooter, width=50, height=10)
corpustext = corpusinput.get("1.0", "end-1c")
corpusinput.grid(row=2, column=1, sticky='nsew')
print(corpustext)`
这会打印一个没有任何字符的空格/行。
【问题讨论】:
标签: python-3.x tkinter