Using Python to develop web sites
Patrick
patrick at armage.nospamthanx.org
Tue Dec 10 20:25:01 EST 2002
Michel Combe wrote:
> I'm thinking to use Python to develop web-sites (e-commerce like).
>
> I've done it already with PHP but I'm sick of <TR><TD></TD><TR> type of
> programming.
???
HTML is HTML, any language you will use will, at end, generate some
<tr>/td></td></tr>.
If you don't want to have html code in your php code, use a template
solution (fasttemplate, phplib, modelixe, ...) or build a class that
wrap the code in functions like
function writeTable($tab) {
echo "<tr>" ;
foreach ($table as $key => $value) {
// whatever you want
}
echo "</tr>" ;
}
Well, IMHO, templates are good solution as you completely separate html
and php code.
> I'm having a look at HTMLgen and I would like to get your opinion on the
> best tools which could help me write the HTML code.
You're asking a python tool that will do the job <tr><td>... that you
find so boring. PHP may help you too with that.
This is not a probleme about python or php.
The best tool to generate html code is a web designer, and you as
dynamic web coder. Each guy with his job.
--
Patrick
More information about the Python-list
mailing list