I\'m trying to run the following in Eclipse (using PyDev) and I keep getting error :
q = queue.Queue(maxsize=0) NameError: global name \'queue\' is not defined<
That's because you're using : from queue import *
from queue import *
and then you're trying to use :
queue.Queue(maxsize=0)
remove the queue part, because from queue import * imports all the attributes to the current namespace. :
queue
Queue(maxsize=0)
or use import queue instead of from queue import *.
import queue