title: Printing contents of a Queue in Python
body: <p>If I am using the python module queue.Queue, I want to be able to print out the contents using a method that does not pop the original queue or create a new queue object.</p>
  
  <p>I have tried looking into doing a get and then putting the contents back but this is too high cost.</p>
  
  <pre><code># Ideally it would look like the following
  from queue import Queue
  q = Queue()
  q.print()
  q.put(1)
  q.print()
  
  &gt;&gt; [] # Or something like this
  &gt;&gt; [1] # Or something like this
  </code></pre>