Python: How to get an updated Entry text to use in a command binded to it?

后端 未结 2 474
情话喂你
情话喂你 2021-01-24 22:05

Consider the following code:

text = Entry(); text.pack()
def show(e):
    print text.get()
text.bind(\'\', show)

Let\'s say I put th

2条回答
  •  时光说笑
    2021-01-24 22:41

    You could replace the event with the event. That should work.

    Here is a list of events: http://infohost.nmt.edu/tcc/help/pubs/tkinter/events.html#event-types

提交回复
热议问题