Gentoo Archives: gentoo-user-de

From: Jan Kohnert <nospam001-lists@×××××××××××××.org>
To: gentoo-user-de@l.g.o
Subject: Re: [gentoo-user-de] [0.5 OT] embedding python code in html with mod_python
Date: Tue, 21 Apr 2009 22:35:07
Message-Id: 200904220035.02880.nospam001-lists@jankoh.dyndns.org
In Reply to: Re: [gentoo-user-de] [0.5 OT] embedding python code in html with mod_python by Steffen 'stefreak' Neubauer
1 Steffen 'stefreak' Neubauer schrieb:
2 > Jan Kohnert <nospam001-lists@×××××××××××××.org> wrote:
3 > > http://www.modpython.org/live/mod_python-3.1.2b/doc-html/pyapi-psp.html
4 >
5 > Ist aber doof so. Ich bin bei Python (und auch bei PHP) für eine
6 > strikte Trennung von HTML und Code.
7
8 Warum? Ich finde, es kommt ganz darauf an, was man machen möchte. Wenn ich
9 z.B. nur einige wenige Funktionen dynamisch brauche, finde ich es
10 übertrieben, das ganze dann mit req.write() bzw. blah="""$text"""; return
11 blah zu machen (oder eben printf()/echo unter php). Man muss natürlich
12 abwägen, wann es sinnvoll ist, das ist richtig.
13
14 > Schau dir mal WSGI (Python Web
15 > Server Gateway Interface) und Jinja (Template Engine) an. Damit wärst
16 > du dann auch nicht an Apache gebunden.
17
18 Danke! Ich schau es mir mal an. Aber ich muss Gott sei Dank nur den Apache
19 betrachten, das macht die Sache sicher etwas einfacher.
20
21 --
22 MfG Jan

Attachments

File name MIME type
signature.asc application/pgp-signature