Making a pass form cgi => webpy framework

Cameron Simpson cs at zip.com.au
Thu Jun 27 19:08:18 EDT 2013


On 27Jun2013 16:32, Νίκος <nikos at superhost.gr> wrote:
| a) keep my existing Python cgi way that embed print ''' statements
| within python code to displays mostly tables?

I'd argue against this approach. Like hand constructing SQL, this
is rife with opportunity to make syntax errors, either outright by
mistyping HTML or accidentally by badly escaping content that is
not supposed to be HTML but happens to contain HTML marker characters
like "<".

When I generate HTML I usually make a structure of lists and dicts
that gets converted to HTML. Someone doing a nontrivial amount of
HTML would use a templating system of some kind I imagine; I don't
generate HTML very often.

Pick a simple framework or templating engine and try it. I have no
recommendations to make in this area myself.

Cheers,
-- 
Cameron Simpson <cs at zip.com.au>

I'm behind a corporate Exchange Server which seems to have            
changed recently to converting everything it sees to HTML.             
How embarrassing. - Dan Espen <despen at telcordia.com>



More information about the Python-list mailing list