random.random - Interpreter works, Script doesn't?
From: Bill (no email)
Date: 03/15/04
- Next message: Stephen Horne: "Re: Is reverse reading possible?"
- Previous message: Uche Ogbuji: "Re: An XML parser is an XML parser. Period."
- Next in thread: Tim Roberts: "Re: random.random - Interpreter works, Script doesn't?"
- Reply: Tim Roberts: "Re: random.random - Interpreter works, Script doesn't?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Stephen Horne: "Re: Is reverse reading possible?"
- Previous message: Uche Ogbuji: "Re: An XML parser is an XML parser. Period."
- Next in thread: Tim Roberts: "Re: random.random - Interpreter works, Script doesn't?"
- Reply: Tim Roberts: "Re: random.random - Interpreter works, Script doesn't?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]