python in dreamweaver

Josiah Carlson jcarlson at
Fri Jan 30 23:48:30 CET 2004

Michel Claveau/Hamster wrote:

> Hi !
> I prepare "template" pages with DM ; in "strategic" position (where i think
> put infos later), i put a key-word ; then i save the page.
> My web-server (in Python) read the HTML-Page, do multiple search/replace
> (key-words by data), then send the page.

It would be significantly more Pythonic to have a template similar to 
the following:

template  = '''
<!-- Insert your HTML mojo here -->

output = template%{'title':"this is the title of the web page",
                    'menu':"this is the menu",
                    'body':"this is the body"}

  - Josiah

More information about the Python-list mailing list