threading in pycharm 4.0.4

0 Collin M · February 26, 2015
I'm having trouble with the python threading tutorial, I keep getting this: "AttributeError: 'module' object has no attribute 'Thread'". Thanks in advance.

Post a Reply

Replies

Oldest  Newest  Rating
0 risto nukk · March 19, 2015
Same problem and code is like this

import threading


class DonMessenger(threading.Thread):
def run(self):
for _ in range(10):
print(threading.currentThread().getName())

x = DonMessenger(name='Send out messages')
y = DonMessenger(name='Receive messages')
x.start()
y.start()
0 risto nukk · March 19, 2015
The problem might be because your file name is threading as well, i got my answer from youtube on the bottom of the video there is the answer by someone...
0 alex constantin · March 1, 2015
What's your code?
  • 1

Python

107,046 followers
About

This section is all about snakes! Just kidding.

Links
Moderators
Bucky Roberts Administrator