random.random - Interpreter works, Script doesn't?

Bill
Sun Mar 14 23:29:48 EST 2004


Hello,
If I type the following code directly into the interpreter, it works. If I
run it from a script, it generates the following error. Can someone help?
Thanks!

------------------------

import random

for i in range(10):
    x = random.random()
    print x

------------------------

TypeError: 'module' object is not callable



More information about the Python-list mailing list