[Zope] What happened to random?

Ron Bickers rbickers@logicetc.com
Fri, 26 Jan 2001 20:57:48 -0500


I believe Python Methods did a lot of auto importing of modules.  In Python
Scripts, you need to import what you want.

Try 'import random' or 'from random import choice'

_______________________

Ron Bickers
Logic Etc, Inc.
rbickers@logicetc.com


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Bill
> Anderson
> Sent: Friday, January 26, 2001 7:36 PM
> To: zope@zope.org
> Subject: [Zope] What happened to random?
>
> OK, got a problem with 2.3.0 and Python Script; one that breaks
> Membership :(
>
> In Python Methods, I can do this
>
> choose=random.choice
>
>
> And it works.
>
> However, in a Python Script in 2.3.0, it barfs, complaining about random
> not being a variable. I've tried self.rhandom, context.rhandom,  and
> _.rhandom, and none work. Any help would be very much appreciated.