[Tutor] Random module error

Guess?!? wtfwhoami at gmail.com
Thu May 15 09:00:04 CEST 2008


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'
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080515/0a690da8/attachment.htm>


More information about the Tutor mailing list