[Zope3-checkins] CVS: Zope3/src/zope/tal/tests/output -
test11.html:1.2.50.1 test29.html:1.2.48.1
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Aug 20 10:00:15 EDT 2003
Update of /cvs-repository/Zope3/src/zope/tal/tests/output
In directory cvs.zope.org:/tmp/cvs-serv5066/tests/output
Modified Files:
Tag: srichter-inlinepython-branch
test11.html test29.html
Log Message:
This commit is a bit chaotic, since I accidently created my branch on an old
checkout.
So the first thing this does is an update with HEAD.
The second part I got the following working:
<p tal:script="server-python">print "hello"</p>
Result <p>hello\n</p>\n
This fails the requirement that we eventually want this syntax:
<script lang="server-python">
print "hello"
</script>
It will be fairly difficult to do this, since we have to introduce sort of
a new namespace to handle this.
Other open issues (I try to solve today):
- How to store global versus local variables. There are two models I can
see being practical:
(a) Make all declared variables inside the code global. This would be
acceptable, since we want to keep it simple and the feature is aimed
at the scripter, who usually does not think carefully about namespaces
anyways.
(b) Have a special markup for making variables global, maybe by reusing
the global keyword?
- How to handle indentation. I have not explored this, but plan to do this
today. I also do not know what will happen to multiline code at this
point.
- What happens if the code contains other tags? I don't know, but I think
we can reuse the Javascript trick and place <!-- --> inside the script
tag to avoid any issues. Of course we would need to handle this case too.
- Security. Currently I call the exec keyword directly without worrying
about any intrusive code. Since the TTW module has the same problem I
will look there for an answer. However, for the DummyEngine the plain
exec is enough I think.
=== Zope3/src/zope/tal/tests/output/test11.html 1.2 => 1.2.50.1 ===
--- Zope3/src/zope/tal/tests/output/test11.html:1.2 Wed Dec 25 09:15:32 2002
+++ Zope3/src/zope/tal/tests/output/test11.html Wed Aug 20 09:00:08 2003
@@ -2,4 +2,7 @@
<a href="http://www.python.org">bar</a>
<p>bad boy!</p>
<p>x undefined</p>
+ x undefined
+ x undefined
+ <hr />
</html>
=== Zope3/src/zope/tal/tests/output/test29.html 1.2 => 1.2.48.1 ===
--- Zope3/src/zope/tal/tests/output/test29.html:1.2 Wed Dec 25 09:15:33 2002
+++ Zope3/src/zope/tal/tests/output/test29.html Wed Aug 20 09:00:08 2003
@@ -1,2 +1 @@
-At the tone the time will be
-59 minutes after 6 PM... beep!
+<div>AT THE TONE THE TIME WILL BE 59 MINUTES AFTER 6 PM... BEEP!</div>
More information about the Zope3-Checkins
mailing list