15 May 08:58
Random module error
From: Guess?!? <wtfwhoami <at> gmail.com>
Subject: Random module error
Newsgroups: gmane.comp.python.tutor
Date: 2008-05-15 07:00:04 GMT
Subject: Random module error
Newsgroups: gmane.comp.python.tutor
Date: 2008-05-15 07:00:04 GMT
Hello All,
I am importing module "random" and it is giving me this error below AttributeError: 'module' object has no attribute 'randrange'
What could be the reason for this? When I chk API ..random module has a function randrange ......
>>> from TurtleWorld import *
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\swampy.1.1\TurtleWorld.py", line 1, in <module>
from World import *
File "C:\Python25\swampy.1.1\World.py", line 29, in <module>
import random
File "C:\Python25\random.py", line 4, in <module>
i = random.randrange(10,50)
AttributeError: 'module' object has no attribute 'randrange'
>>>
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python25\swampy.1.1\TurtleWorld.py", line 1, in <module>
from World import *
File "C:\Python25\swampy.1.1\World.py", line 29, in <module>
import random
File "C:\Python25\random.py", line 4, in <module>
i = random.randrange(10,50)
AttributeError: 'module' object has no attribute 'randrange'
>>>
_______________________________________________ Tutor maillist - Tutor <at> python.org http://mail.python.org/mailman/listinfo/tutor
RSS Feed