title: AttributeError: object has no attribute 'tk'
body: <p>I have searched quite a bit,but I couldn't find a solution to this. I'm trying to create a registration form using tkinter which later on i shall connect to a database. Here is the code :</p>
  
  <pre><code>from Tkinter import *
  
  
  class MWindow(object):
  
      def __init__(self,master):
  
          self.frame=Frame(master)
          self.frame.pack()
  
          self.title= Label(self,text = "Login")
          self.title.grid(row=0,column=1)
  
          self.userid_label = Label(self,text ="Username: ")
          self.userid_label.grid(row=1,column=0)
  
          self.userid_entry= Entry(self)
          self.userid_entry.grid(row=1,column=1)
  
          self.password_label = Label(self,text ="Password: ")
          self.password_label.grid(row=2,column=0)
  
          self.password_entry= Entry(self)
          self.password_entry.grid(row=2,column=1)
  
          self.signin = Button (self,text = "Login",command=logging_in)
          self.signin.grid(row=5,column=1)
  
          self.signup = Button (self,text = "Sign Up",command=signing_up)
          self.signin.grid(row=5,column=2)
  
      def logging_in(self):
          pass
      def signing_up(self):
          pass
  
  root= Tk()
  root.attributes('-fullscreen',True)
  root.resizable(width=False, height=False)
  root.title("My Registration Form")
  app=MWindow(root)
  root.mainloop()
  </code></pre>
  
  <p>Here is the error i get : </p>
  
  <blockquote>
    <p>Traceback (most recent call last):<br/>
      File "form.py", line 41, in <br/>
        app=MWindow(root)<br/>
      File "form.py", line 11, in <strong>init</strong><br/>
        self.title= Label(self,text = "Login")<br/>
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 2591, in <strong>init</strong><br/>
        Widget.<strong>init</strong>(self, master, 'label', cnf, kw)<br/>
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 2081, in <strong>init</strong><br/>
        BaseWidget._setup(self, master, cnf)<br/>
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 2059, in _setup<br/>
        self.tk = master.tk<br/>
    AttributeError: 'MWindow' object has no attribute 'tk'</p>
  </blockquote>
  
  <p>I tried going to the library files to understand what's wrong,but being a beginner i can't make much of it. Some explanation of what's going wrong and why would be very helpful.</p>