(For gurus) Embed functions in webpages like in PHP?

Ville Vainio ville at spammers.com
Fri Apr 16 08:36:44 EDT 2004


>>>>> "rob" == Robert Ferber <rob at nospam.net> writes:

    rob> Hi, I'm a PHP-programmer who evaluates Python for a new
    rob> project.  I really like a lot of concepts of Python,
    rob> especially the shell, but there is one great feature of PHP
    rob> which I don't know how to replace in Python:

    rob> <html>
    rob> <? echo random_banner(); ?>
    rob> important database result that took 20 minutes to generate
    rob> </html>

Check out the new mod_python, it offers exactly the functionality you
need. Some discussion is here:

http://www.onlamp.com/pub/a/python/2004/02/26/python_server_pages.html

A teaser:

<html>
<%
import time
%>
<h1>Current time is
<%= time.ctime() %> </h1>
</html>

-- 
Ville Vainio   http://tinyurl.com/2prnb



More information about the Python-list mailing list