title: Queue module error
body: <pre><code>#!/usr/bin/env python
  
  import threading 
  import Queue
  import time 
  from ftplib import FTP
  
  
  ftphostlist = ['ftp.x.org', 'ftp4.FreeBSD.org', 'ftp.ncsa.uiuc.edu',
  'ftp.crans.org']
  
  class WorkerThread(threading.Thread):
  
      def __init__(self, queue, tid):
          threading.Thread.__init__(self)
          self.lock = threading.Lock()
          self.queue = queue
          self.tid = tid
          print "Worker %d Reporting for Service Sir!" % self.tid
  
      def run(self):
  
          while True: 
              host = None
  
  
              try: 
                  host = self.queue.get(timeout=1)
  
                  #time.sleep(2)
  
  
              except Queue.Empty: 
                  print "Worker %d exiting..." % self.tid
                  return
  
  
              #login to ftp host anonymously and list the dirs 
              self.lock.acquire()
              try: 
                  conn = FTP(host)
                  conn.login()
                  print 'Host: ' + host
                  time.sleep(2)
                  print host + conn.retrlines('LIST')
  
  
  
              except: 
                  print "Error in listing" +host
                  raise
                  self.lock.release()
  
              self.queue.task_done()
  
  queue = Queue.Queue()
  
  threads = []
  for i in range(1, 5): 
      t = threading.Thread(target=WorkerThread, args=('Threads -1', 3))
      t.start()
      print "Creating WorkerThread : %d" %i 
      worker = WorkerThread(queue, i)
      worker.setDaemon(True)
      worker.start()
      threads.append(worker)
      print "WorkerThread %d Created!" %i 
      time.sleep(.2)
  
  for host in ftphostlist: 
      queue.put(host)
  
  queue.join()
  
  #wait for all the threads to exit
  
  for item in threads: 
      item.join
  
  print "Scanning Complete!"
  </code></pre>
  
  <p>Hi, </p>
  
  <p>I am very new to python and was trying to make an FTP connecter as suggested by Pentesteracademy. I was working on an exercise which seemed to run correctly for a few times and then i get an error stating</p>
  
  <pre><code>"File "ftp_login.py", line 4, in &lt;module&gt;
      from Queue import *
    File "/media/sf_Python/Pentest/Queue.py", line 22, in &lt;module&gt;
      queue = Queue.Queue()
  TypeError: 'module' object is not callable"
  </code></pre>
  
  <p>I am not sure exactly where i went wrong but I have spent quite a few useless hours trying to figure it out. Sorry if the issue is simple I am just failing to see it </p>