[Zope] Re: [ZDP] Links between DTML language and Python language...

Rik Hoekstra rik.hoekstra@inghist.nl
Thu, 8 Jun 2000 09:47:10 +0200


>
>
>In the last mail I sent, I explaint my problem to know if a specified item
is
>in a list. Oleg helped me and said that : "Learn Python". Now, I wonder if
>there are strong links between DTML language and Python language. Because,
in
>the DTML language reference, you can find nothing meaning that.


As such the links are not really strong. But knowing Python helps you  to
understand what is going on in python. Moreover, you may sometimes want or
have to resort to External/Python methods to stuff DTML is not usable for.
DTML is really just a presentation language. As now there are no real
guidelines as to when to use what. Use your own intuition ;-(

>
>Sometimes, I see functions used in DTML which are not referenced in DTML
>language reference. I guess that it's Python functions. So, I ask the
question
>if it's advised to be introduced to Python before programming in DTML. I
would
>like to know too, if there is any rule that specify how to use Python
functions
>in DTML language, and if all Python functions are accessible in DTML...
>
>

everytime you use an expression in DTML (<dtml-var expr="..."> or plainly
<dtml-var "...">) the part between quotes is a python expression, which does
not respond to dtml rules, but to python rules. Usually these are quite
simple, but to use them you have to know some Python.

Note, that learning (some) Python is not very difficult. And there are good
training materials (and books) available.

hth

Rik