[Zope] calling Python Script from dtml-let
Tino Wildenhain
tino at wildenhain.de
Mon Oct 18 01:50:20 EDT 2004
Hi,
Am Mo, den 18.10.2004 schrieb Bill Seitz um 3:03:
> I have a simple Python Script called passwordRandom().
>
> It works fine if I call it with:
> <dtml-call "REQUEST.set('password', passwordRandom())">
>
> But I want that value to be available for some other things, so I want
> to set a variable with dtml-let.
You dont need to. If you use REQUEST.set, you have the variable
automatically in the namespace for DTML.
> But if I do:
> <dtml-let password2 = "passwordRandom()">
> (with a </dtml-let> further down)
I think you must do <dtml-let "password2 = passwordRandom()">
or something along. Read the reference if you really want to do
DTML :)
Btw. Python does not bite. Code looks much cleaner in python
scripts - the expressions are the same but without a lot of
strange < ...> tags around them :-)
Regards
Tino
More information about the Zope
mailing list