Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以基本上我正在尝试使用python制作命令行界面,并且我有输入命令的文本区域。我想要实现的是每个命令都在不按按钮的情况下执行(只需按回车键)
您可以使用 将 Enter 键绑定到函数.bind('<Return>', function)。
.bind('<Return>', function)