title: Pickle Queue objects in python
body: <p>I have a class that uses a list of Queue objects. I need to pickle this class including the information saved in the queue objects. For example:</p>
  
  <pre><code>import Queue
  import pickle
  
  class QueueTest(object):
      def __init__(self):
          self.queueList = []
      def addQueue(self):
          q = Queue.Queue()
          q.put('test')
          self.queueList.append(q)
  
  
  obj = QueueTest()
  obj.addQueue()
  
  with open('pickelTest.dat','w') as outf:
      pickle.dump(obj,outf)
  </code></pre>
  
  <p>returns the error</p>
  
  <pre><code>raise TypeError, "can't pickle %s objects" % base.__name__
  TypeError: can't pickle lock objects
  </code></pre>
  
  <p>Is there a work around to pickle Queue objects?</p>