"Christoph Rackwitz" <[EMAIL PROTECTED]> writes: > You didn't quite get the OP's intention, I guess. > > The OP wanted Python to be a bit more freeform by adding "end" tags. > That might be an improvement for web scripting, but I haven't seen the > solutions of the existing frameworks and won't dare to compare.
Existing frameworks (the one's I've looked at anyway) tend to replace indents with end tags of some kind. Doing anything else tends to get ugly unless the language you are templating for treats whitespace the same way Python does. I'd argue that you're better off using a real templating system than trying to mangle Python into becoming a more acceptable templating system. For templates, you tend to want to access multiple different names spaces that are only vaguelly related to the Python contextual name spaces. For example, you may want CGI (or whatever variables) available directly in the template, rather than as CGI["foobar"].value. However, you don't want them showing up in front of your templat variables; you want to be able to say "add CGI variables foo, bar and foobar to the current name space" in a short manner. Templating systems (well, the better ones, anyway) let you manipulate those name spaces in ways you can't do in python. Cheeta and ClearSilver come to mind as systems that will let you do this. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list