How did I screw this up?

Widgeteye Widgeteye at widgets.com
Fri Jul 23 11:55:03 EDT 2004



I was experimenting with defining functions, as I am new to python.
And now one of the functions in the /usr/local/lib/python2.3/random.py
modules is screwed up. I didn't do anything to it. I wasn't even
in that directory. I was in the /shared/src directory where I do all
my experimenting. But I made a little program called random.py in the
/shared/src directory and put a def go(): in that file. Now when I 
run any program with random.randrange() in it I get the following
error:

Traceback (most recent call last):
  File "blackjack.py", line 3, in ?
    import math, string, random, sys
  File "/usr/local/lib/python2.3/random.py", line 7, in ?
    sequences
  File "/usr/local/lib/python2.3/random.py", line 4, in go
    --------
AttributeError: 'module' object has no attribute 'randrange'

Up until I made the file random.py with the function go() in it
everythiing was working fine. 

I deleted the file and rebooted (silly I know) but nothing seems to help.
What do I do now and what happened?????

Thanks
Widgeteye



More information about the Python-list mailing list