Advertisement
Guest User

Untitled

a guest
Dec 18th, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. def gt():
  2. global e
  3. string = e.get()
  4. print(string)
  5. def p():
  6. b.destroy()
  7. c.destroy()
  8. w = Label(top, text="here are what you can use:")
  9. w1 = Label(top, text="qwertyuiop[]asdfghjkl;zxcvbnm,./QWERTYUIOPASDFGHJKLZXCVBNM123456789")
  10. w.pack()
  11. w1.pack()
  12. L1 = Label(top, text="give me the password")
  13. L1.pack( side = LEFT)
  14. e=Entry(top)
  15. e.pack()
  16. r = Button(top,text='okay',command=gt)
  17. r.pack(side='bottom')
  18. top.mainloop()
  19.  
  20. Traceback (most recent call last):
  21. File "C:Python33libidlelibrun.py", line 121, in main
  22. seq, request = rpc.request_queue.get(block=True, timeout=0.05)
  23. File "C:Python33libqueue.py", line 175, in get
  24. raise Empty
  25. queue.Empty
  26.  
  27. During handling of the above exception, another exception occurred:
  28.  
  29. Traceback (most recent call last):
  30. File "C:Python33libtkinter__init__.py", line 1475, in __call__
  31. return self.func(*args)
  32. File "C:UsersHadiDesktopt.py", line 51, in gt
  33. string = e.get()
  34. NameError: global name 'e' is not defined
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement