I created my own module named queue
, and am trying to import it. However, when trying to use it, I get the error 'Queue' object has no attribute 'enqueue'
.
How can I import my own queue (which does have an enqueue
), and not the standard-library one (which does not)?
def driver():
import queue
q = queue.Queue()
for line in df:
if 'received' in line:
q.enqueue(line)
print("Adding job " + new_item.job_ID + " to the queue with the timestamp: " + new_item.time_stamp + ".")
print("The prority of the job is: " + new_item.job_priority)
print("The job type is: " + new_item.job_type)