fork download
  1. import tkinter
  2.  
  3. def cb(msg):
  4. print(msg)
  5.  
  6. btn = ['hui', 'pizda']
  7.  
  8. top = tkinter.Tk()
  9.  
  10. for b in btn:
  11. bo = tkinter.Button(top, text=b, command=lambda param=b: cb(param))
  12. bo.pack()
  13.  
  14. top.mainloop()
Runtime error #stdin #stdout #stderr 0.22s 23420KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "./prog.py", line 1, in <module>
ModuleNotFoundError: No module named 'tkinter'