[Tutor] using python to write web page

Brett Ritter swiftone at swiftone.org
Thu Jun 16 03:02:21 CEST 2011


On Wed, Jun 15, 2011 at 8:46 PM, naheed arafat <naheedcse at gmail.com> wrote:
> Or there is any python module to get this job done?

The normal way this sort of thing is handled is that the HTML is in
some form of template, where the tags you are talking about editing
are variables.  A common example is a web-based form where you want to
present either a blank form or the same form pre-populated. So rather
than generating the HTML, then editing it to be different you instead
simple set the variables and generate the HTML and the result reflects
whatever the variables were set to.

There are multiple modules for such templates.

This is assuming that you generate the HTML in the first place instead
of trying to edit someone elses existing HTML.  In that case you'd
proceed as you described.

-- 
Brett Ritter / SwiftOne
swiftone at swiftone.org


More information about the Tutor mailing list