Threading change, 2.5.4 -> 2.6.1

MRAB python at mrabarnett.plus.com
Thu Jan 7 18:01:52 EST 2010


Gib Bogle wrote:
> The code below runs with Python 2.5.4, but gives the following error 
> messages with Python 2.6.1.  What needs to be done to make it work?  
> Thanks.
> 
> C:\Summer09\Tutorials>python url_queue.pyw
> Traceback (most recent call last):
> File "url_queue.pyw", line 3, in <module>
> import threading
> File "C:\Summer09\Tutorials\threading.py", line 9, in <module>
> class ProcessingThread(threading.Thread, QtCore.QObject):
> AttributeError: 'module' object has no attribute 'Thread'
> 
[snip]
url_queue.pyw is trying to import Python's "threading" module, but it's
finding the threading.py script in your "Tutorials" folder first.

Renaming your tutorial script to something other than "threading.py".



More information about the Python-list mailing list