script delimiters
David Porter
jcm at bigskytel.com
Thu Oct 19 21:26:11 EDT 2000
* Ian Lipsky <NOSPAM at pacificnet.net>:
> Right now (although i havent tried this) i think i should be able to create
> html files and put <script></script> tags within the html to execute python
> code.
> What i wanted to know if there was someway to shorten this down to using
> delimiter characters?
>
> So i could do something like:
>
> <% if something: %>
> some html text saying something is true
> <%else:%>
> some html text saying something isnt true
>
How about:
<?
if something:
print "some html text saying something is true"
else:
print "some html text saying something isnt true"
?>
It looks to me that this would be even shorter than what you had in mind.
This is how PMZ (Poor Man's Zope) works. See http://www.suxers.de/pmz.htm
More information about the Python-list
mailing list