Server IP : 162.213.251.212 / Your IP : 3.129.23.166 [ Web Server : LiteSpeed System : Linux business55.web-hosting.com 4.18.0-553.lve.el8.x86_64 #1 SMP Mon May 27 15:27:34 UTC 2024 x86_64 User : allssztx ( 535) PHP Version : 8.1.31 Disable Function : NONE Domains : 1 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /proc/self/root/lib64/python2.7/Demo/tkinter/matt/ |
Upload File : |
from Tkinter import * import string # This program shows how to use a simple type-in box class App(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.pack() self.entrythingy = Entry() self.entrythingy.pack() # and here we get a callback when the user hits return. we could # make the key that triggers the callback anything we wanted to. # other typical options might be <Key-Tab> or <Key> (for anything) self.entrythingy.bind('<Key-Return>', self.print_contents) def print_contents(self, event): print "hi. contents of entry is now ---->", self.entrythingy.get() root = App() root.master.title("Foo") root.mainloop()