fork download
  1. # your code goes here
  2. from tkinter import *
  3. class Application(Frame):
  4. def __init__(self, master):
  5. super(Application, self).__init__(master) # [1]
  6. self.grid()
  7. self.create_widgets()
  8. def create_widgets(self):
  9. # первая кнопка
  10. self.Ьttn1 = Button(self, text = "Я ничего не делаю!")
  11. self.bttn1.grid()
  12. # вторая кнопка
  13. self.Ьttn2 = Button(self)
  14. self.Ьttn2.grid()
  15. self.Ьttn2.configure(text ="И я тоже!")
  16. #третья кнопка
  17. self.ЬttnЗ = Button(self)
  18. self.bttnЗ.grid()
  19. self.ЬttnЗ["text"] ="И я!"
  20. root = Tk()
  21. root.title("Бесполезные кнопки - 2")
  22. root.geometry("200x85")
  23. app = Application(root)
  24. root.mainloop()
  25.  
Runtime error #stdin #stdout #stderr 0.04s 27192KB
stdin
Standard input is empty
stdout
Standard output is empty
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.