Gabriel Genellina wrote:
... def convert(in_queue, out_queue): while True: row = in_queue.get() if row is None: break # ... convert row out_queue.put(converted_line)
These loops work well with the two-argument version of iter, which is easy to forget, but quite useful to have in your bag of tricks: def convert(in_queue, out_queue): for row in iter(in_queue.get, None): # ... convert row out_queue.put(converted_line) --Scott David Daniels scott.dani...@acm.org -- http://mail.python.org/mailman/listinfo/python-list