[code.view]

[top] / python / PyMOTW / Queue / Queue_fifo.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     """FIFO Queue
     """
     #end_pymotw_header
     
     import Queue
     
     q = Queue.Queue()
     
     for i in range(5):
         q.put(i)
     
     while not q.empty():
         print q.get()
     

[top] / python / PyMOTW / Queue / Queue_fifo.py

contact | logmethods.com