Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. from tkinter import simpledialog
  2. from tkinter import *
  3. def s():
  4. print(simpledialog.askstring("hai","inp"))
  5.  
  6. root = Tk()
  7. b = Button(root, text="popup",command=s)
  8. b.pack()
  9.  
  10. root.geometry("400x400")
  11. root.mainloop()
  12.  
  13. Exception in Tkinter callback
  14. Traceback (most recent call last):
  15. File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1550, in __call__
  16. return self.func(*args)
  17. File "popup.py", line 4, in s
  18. print(simpledialog.askstring("hai","inp"))
  19. AttributeError: 'module' object has no attribute 'askstring'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement