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.
[EMAIL PROTECTED]


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
> Anderson
> Sent: Friday, January 26, 2001 7:36 PM
> To: [EMAIL PROTECTED]
> 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.


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to