Threading change, 2.5.4 -> 2.6.1

Gib Bogle g.bogle at auckland.no.spam.ac.nz
Thu Jan 7 20:14:59 EST 2010


MRAB wrote:
> 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".

Thanks very much to you both.  It's actually not in my folder, it is 
(presumably) in my student's folder (I'm the one using 2.5.4, she has 2.6.1 and 
thought this could be the problem.)



More information about the Python-list mailing list