Links between DTML language and Python language...
Hello all, 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. 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... Thanks, Fred
On Thu, 8 Jun 2000, QUIN FrИdИric wrote:
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.
The link is simple and strong: what you have in double qoutes is just a python code! (with some security limitations): <dtml-var "here_comes_some_python_call()"> or, for example, <dtml-call "REQUEST.set('variableu', another_call())">
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
Most of the time they are Zope functions - methods, defined in Zope classess. They are poorly documente 'cause real Hackers Have No Time to Document! :) Your real source of information is Zope source code. That's another strong reason to learn Python. Oleg. (All opinions are mine and not of my employer) ---- Oleg Broytmann Foundation for Effective Policies phd@phd.russ.ru Programmers don't die, they just GOSUB without RETURN.
participants (2)
-
Oleg Broytmann -
QUIN Fr�d�ric