[Zope] DTML Method or PyScript returning image?
CJ Kucera
pez@apocalyptech.com
Tue, 9 Oct 2001 12:05:37 -0500 (CDT)
On Tue Oct 9 06:48:24 2001, Timothy Wilson wrote:
> Maybe I'm misunderstanding your requirements, but a quick Python script can
> return a selection from a group of images. Something like:
>
> """
> This script returns a random image.
> """
> import random
> return random.choice(context.objectValues('Image'))
Actually, that's not really what I want, because there are more images
in the directory than I want to include in the random "rotation" (I
suppose I could move 'em off to another directory, though).
In any case, that bit's working the way I want it, and now the other
bit is, too. But thanks!
-CJ
WOW: Rapacious | A priest advised Voltaire on his death bed to
apocalyptech.com/wow | renounce the devil. Replied Voltaire, "This
pez@apocalyptech.com | is no time to make new enemies."