import random module

Michael Tobis mtobis at gmail.com
Wed Mar 22 12:00:48 EST 2006


1) remove the file random.pyc in your working directory

2) rename the file random.py to something else and run it.

The import mechanism is looking for random.pyc or random.py, but you
have already named your file that! Your current directory is above your
library directory in python's search path, so it finds that before it
finds the library module.

mt




More information about the Python-list mailing list