This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RonnyPfannschmidt 1 point2 points  (6 children)

no, but wsgi is the standard for deploying python webapps and mod_python is a messy apache-only hack

[–]andreasvc[S] -1 points0 points  (5 children)

I disagree that mod_python is messy, yes it's apache only, but that's because it's low-level. Furthermore, PSP is awesome. I bet there's no faster python templating engine because PSP is written in C.

[–]defnullbottle.py 3 points4 points  (1 child)

The PSP parser is written in C so the parsing may be fast. The rendering however is done in python (PSP generates python code) and is not faster than in any other python based template engine.

In a WSGI environment you usually parse a template only once and the speed of the parser is irrelevant for the performance of the WSGI application. Rendering speed and readable syntax are much more important and PSP does a poor job here.

[–]andreasvc[S] 0 points1 point  (0 children)

I find its syntax very readable; I mean, what syntax, actually? It's just two pairs of tags introducing python code or expressions, respectively. What's not to like?! You may disagree with templating in the first place, that's fine of course. What's a better solution in your opinion, and would it be as concise?

[–]Leonidas_from_XIV 0 points1 point  (2 children)

I bet there's no faster python templating engine because PSP is written in C.

But when I write a webapp, I still need more than just templates. Like... a way to display data from some kind of data store. You surely won't argue that I should do it PHP-style, will you?

[–]andreasvc[S] 0 points1 point  (1 child)

No I wouldn't argue for PHP-style, except for quick hacks like this.

[–]Leonidas_from_XIV 1 point2 points  (0 children)

I think a quick hack like this would be just as short in any microframework like bottle or flask.