title: NameError: name 'self' is not defined - when trying to post values to different queues
body: <p>is this correct way of doing.i am a newbie python</p>
  
  <pre><code>class main(threading.Thread):
      queueLock = threading.Lock()
      EppQueue = Queue.Queue(1)
      CrQueue = Queue.Queue(1)
      EPP = threading.Thread(name='EPP', target=EPP, args=(0,EppQueue,))
      cr = threading.Thread(name='cr', target=CR, args=(0,CrQueue,))
      EPP.setDaemon(True)
      EPP.start()
      Cr.start()
      self.send_queue("EppQueue","sss")
      self.send_queue("CrQueue","ssds")
  
      def send_queue(self,queuename,qvalue,b=None):
          if b is None:
              b = self.queuename
          self.queueLock.acquire()
          self.b.put(qvalue)
          self.queueLock.release()
  </code></pre>
  
  <p>when i run this i get NameError: name 'self' is not defined ???</p>