I'm trying to catch a Queue.Empty exception that is raised if a multiprocessing.Queue is empty. The following does not work:
import multiprocessing
f = multiprocessing.Queue()
try:
f.get(True,0.1)
except Queue.Empty:
print 'foo'
This gives me a name error: NameError: name 'Queue' is not defined
replacing Queue.Empty with multiprocessing.Queue.Empty does not help either. In this case it gives me a "AttributeError: 'function' object has no attribute 'Empty'" exception.