Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import simpledialog
- from tkinter import *
- def s():
- print(simpledialog.askstring("hai","inp"))
- root = Tk()
- b = Button(root, text="popup",command=s)
- b.pack()
- root.geometry("400x400")
- root.mainloop()
- Exception in Tkinter callback
- Traceback (most recent call last):
- File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1550, in __call__
- return self.func(*args)
- File "popup.py", line 4, in s
- print(simpledialog.askstring("hai","inp"))
- AttributeError: 'module' object has no attribute 'askstring'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement