# your code goes here
from tkinter import *
class Application( Frame) :
def __init__ ( self , master) :
super ( Application, self ) .__init__ ( master) # [1]
self .grid ( )
self .create_widgets ( )
def create_widgets( self ) :
# первая кнопка
self .Ьttn1 = Button( self , text = "Я ничего не делаю!" )
self .bttn1 .grid ( )
# вторая кнопка
self .Ьttn2 = Button( self )
self .Ьttn2.grid ( )
self .Ьttn2.configure ( text = "И я тоже!" )
#третья кнопка
self .ЬttnЗ = Button( self )
self .bttn З.grid ( )
self .ЬttnЗ[ "text" ] = "И я!"
root = Tk( )
root.title ( "Бесполезные кнопки - 2" )
root.geometry ( "200x85" )
app = Application( root)
root.mainloop ( )
IyB5b3VyIGNvZGUgZ29lcyBoZXJlCmZyb20gdGtpbnRlciBpbXBvcnQgKgpjbGFzcyBBcHBsaWNhdGlvbihGcmFtZSk6CiAgICBkZWYgX19pbml0X18oc2VsZiwgbWFzdGVyKToKICAgICAgICBzdXBlcihBcHBsaWNhdGlvbiwgc2VsZikuX19pbml0X18obWFzdGVyKSAjIFsxXQogICAgICAgIHNlbGYuZ3JpZCgpCiAgICAgICAgc2VsZi5jcmVhdGVfd2lkZ2V0cygpCiAgICBkZWYgY3JlYXRlX3dpZGdldHMoc2VsZik6CiAgICAgICAgIyDQv9C10YDQstCw0Y8g0LrQvdC+0L/QutCwCiAgICAgICAgc2VsZi7QrHR0bjEgPSBCdXR0b24oc2VsZiwgdGV4dCA9ICLQryDQvdC40YfQtdCz0L4g0L3QtSDQtNC10LvQsNGOISIpCiAgICAgICAgc2VsZi5idHRuMS5ncmlkKCkKICAgICAgICAjINCy0YLQvtGA0LDRjyDQutC90L7Qv9C60LAKICAgICAgICBzZWxmLtCsdHRuMiA9IEJ1dHRvbihzZWxmKQogICAgICAgIHNlbGYu0Kx0dG4yLmdyaWQoKQogICAgICAgIHNlbGYu0Kx0dG4yLmNvbmZpZ3VyZSh0ZXh0ID0i0Jgg0Y8g0YLQvtC20LUhIikKICAgICAgICAj0YLRgNC10YLRjNGPINC60L3QvtC/0LrQsAogICAgICAgIHNlbGYu0Kx0dG7QlyA9IEJ1dHRvbihzZWxmKQogICAgICAgIHNlbGYuYnR0btCXLmdyaWQoKQogICAgICAgIHNlbGYu0Kx0dG7Ql1sidGV4dCJdID0i0Jgg0Y8hIgpyb290ID0gVGsoKQpyb290LnRpdGxlKCLQkdC10YHQv9C+0LvQtdC30L3Ri9C1INC60L3QvtC/0LrQuCAtIDIiKQpyb290Lmdlb21ldHJ5KCIyMDB4ODUiKQphcHAgPSBBcHBsaWNhdGlvbihyb290KQpyb290Lm1haW5sb29wKCkK
stdout
stderr
Traceback (most recent call last):
File "./prog.py", line 20, in <module>
File "/usr/lib/python3.4/tkinter/__init__.py", line 1859, in __init__
self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use)
_tkinter.TclError: Can't find a usable init.tcl in the following directories:
/usr/share/tcltk/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.4/library /tcl8.6.4/library
This probably means that Tcl wasn't installed properly.