Re: python in dreamweaver
From: Josiah Carlson (jcarlson_at_nospam.uci.edu)
Date: 01/30/04
- Next message: Erwin S. Andreasen: "Re: Chart drawing library for Python"
- Previous message: Dave K: "Re: conditional expression sought"
- In reply to: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Next in thread: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Reply: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Jan 2004 14:48:30 -0800
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 = '''
<html>
<head>
<title>%(title)s</title>
</head>
<body>
<!-- Insert your HTML mojo here -->
%(menu)s
%(body)s
</body>
</html>
'''
output = template%{'title':"this is the title of the web page",
'menu':"this is the menu",
'body':"this is the body"}
- Josiah
- Next message: Erwin S. Andreasen: "Re: Chart drawing library for Python"
- Previous message: Dave K: "Re: conditional expression sought"
- In reply to: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Next in thread: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Reply: Michel Claveau/Hamster: "Re: python in dreamweaver"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|