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

From: Bill (no email)
Date: 03/15/04


Date: Sun, 14 Mar 2004 20:29:48 -0800

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