On Tue, Feb 9, 2010 at 2:06 PM, mukesh tiwari <span dir="ltr"><<a href="mailto:mukeshtiwari.iiitm@gmail.com">mukeshtiwari.iiitm@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Could some one please tell what is wrong with this code. I am trying<br>
to use Queue in this program but i am getting error<br>
Traceback (most recent call last):<br>
  File "/home/user/NetBeansProjects/NewPythonProject2/src/<br>
Pollard_rho.py", line 80, in <module><br>
    factor(n)<br>
  File "/home/user/NetBeansProjects/NewPythonProject2/src/<br>
Pollard_rho.py", line 59, in factor<br>
    Q_1=Queue()<br>
NameError: global name 'Queue' is not defined.<br></blockquote><div><br></div><div>That's because you haven't imported the Queue module.</div><div><br></div><div>You need to do:</div><div><br></div><div>    import Queue</div>

<div><br></div><div>Then call:</div><div><br></div><div>    Q_1 = Queue.Queue()</div><div><br></div><div>Alternately, you can do:</div><div><br></div><div>    from Queue import Queue</div><div><br></div><div>And instantiate the class the same way you previously were.</div>

</div><br clear="all"><div name="mailplane_signature">--S</div>