fork download
  1. import tkinter
  2. import random
  3.  
  4.  
  5. def rand_statya():
  6. random.seed(version=3)
  7. label2['text'] = random.randint(105, 360)
  8.  
  9. mainFrame = tkinter.Tk()
  10. mainFrame.title("Тест на пидораса")
  11. mainFrame.resizable(False, False)
  12.  
  13. firstText = random.randint(105, 360)
  14.  
  15. label1 = tkinter.Label(mainFrame, text='Ваша статья:', width=24)
  16. label2 = tkinter.Label(mainFrame, text=firstText, width=24)
  17. button = tkinter.Button(mainFrame, text='Сгенерировать', width=24, command=rand_statya())
  18.  
  19. label1.pack()
  20. label2.pack()
  21. button.pack()
  22.  
  23. mainFrame.mainloop()
Runtime error #stdin #stdout #stderr 0.05s 29584KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 9, 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.