2008/12/17 wmiller walter.mil...@gmail.com:
A scheme which just tries to do textual substitution of 'print' in
code before evaling/compiling it is not a good idea.
this is the approach. For code between % % tags, first replace
'print' with 'printwrite', then compile, then pass to eval with
The templating is working as designed and it's pretty responsive
subjectively speaking. For those who might be interested, I'll post
some code and benchmarks after taking some time to clean up the code
and figure out a safe way to use eval within the template.
You should avoid 'eval',
here the the print statement is modified to just return output to the
browser. Also, variables surrounded by { } are returned to the
browser based on the variables in locals(). I'm still holding out
hope that there'll be a way to make eval safe or maybe figure out a
better alternative to
On Dec 16, 4:17 pm, wmiller walter.mil...@gmail.com wrote:
%
def fib(n):
a, b = 0, 1
while b n:
print(str(b) + , )
a, b = b, a+b
return b-a
var = fib(100)
%
brbr
{var}
Suggestion,
def fib(n):
a, b = 0, 1
while b n:
print(str(b) + , )
Suggestion,
def fib(n):
a, b = 0, 1
while b n:
print(str(b) + , )
a, b = b, a+b
return b-a
var = fib(100)
%
brbr
{var}
%
Would make it python compatible, wsgi compatible, unit test
compatible, import compatible, eval
2008/12/17 wmiller walter.mil...@gmail.com:
The templating is working as designed and it's pretty responsive
subjectively speaking. For those who might be interested, I'll post
some code and benchmarks after taking some time to clean up the code
and figure out a safe way to use eval
2008/12/15 gert gert.cuyk...@gmail.com:
lol :)
Anyway wsgi is not that bad, it just different and makes your code
look better. Ok the auto reload script thing is not as flexible as php
yet but Graham is working on a PythonPathMatch and a
Have not the foggiest what you are talking about
2008/12/16 wmiller walter.mil...@gmail.com:
It doesn't need C code and can be just as fast as normal WSGI
application. Am too busy at the moment to explain further, maybe later
today.
Graham
quick update, I got it working as you suggested:
Action pyp-scripts /pyp-interpreter
See i was not the only one thinking this way :-)
http://www.csh.rit.edu/~jon/projects/pip/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
modwsgi group.
To post to this group, send email to
2008/12/14 gert gert.cuyk...@gmail.com:
See i was not the only one thinking this way :-)
http://www.csh.rit.edu/~jon/projects/pip/
Presumably abandoned when they realised that it wasn't perhaps a
useful thing after all.
Last updated: October 21, 2003
Graham
another approach i was thinking is the import approach
something like import apache and import cgi but then import wsgi and
import php
where php module defines your template specification like php.echo for
example.
Its just a bit weird that the wsgi guy's put there heads together to
redesign the
2008/12/10 wmiller [EMAIL PROTECTED]:
Is it possible configure mod_wsgi to recognize WSGI application script
files without explicitly declaring the application object within each
script file? If not, is there a elegant/crude work-around?
Along the same lines, if that were possible, it
So let me get this straight, you are going to rewrite all this parsing
cashing ch*t in python, just you can have your own templates ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
modwsgi group.
To post to this
On Dec 10, 5:32 am, Graham Dumpleton [EMAIL PROTECTED]
wrote:
I have been asked something similar a number of times. I don't know
why but it is always to me direct and not on the mailing list. Not
sure if it means the others were embarrassed about their yearnings for
something more like PHP
On Dec 10, 1:52 pm, gert [EMAIL PROTECTED] wrote:
So let me get this straight, you are going to rewrite all this parsing
cashing ch*t in python, just you can have your own templates ?
That's part of the motivation. The rest is the desire to have the
option to choose pure WSGI application
Am I the only one here that thinks this is a bad approach (i said
approach not idea)
I mean you go from mod_wsgi and make it act as a cripple mod_scgi with
GIL stuff and no stdout to transform it into mod_php using a
interpreter that execute instructions as fast as a elephant doing
backstrokes in
On Dec 10, 2:24 pm, gert [EMAIL PROTECTED] wrote:
Am I the only one here that thinks this is a bad approach (i said
approach not idea)
I mean you go from mod_wsgi and make it act as a cripple mod_scgi with
GIL stuff and no stdout to transform it into mod_php using a
interpreter that execute
2008/12/11 gert [EMAIL PROTECTED]:
You just ask Graham where in his code he finished with all the caching
prefetching process management. And you change the tiny little wsgi
part of it. Note that, Graham actually has a translator around his
neck because of all the c code he has been writen
Sure assembler is also possible :-)
When Graham mind is in binary mode you can see on a egg scan his
brainwaves resembling IEEE 802.11 :-)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
modwsgi group.
To post to
On Dec 9, 8:47 pm, wmiller [EMAIL PROTECTED] wrote:
Is it possible configure mod_wsgi to recognize WSGI application script
files without explicitly declaring the application object within each
script file? If not, is there a elegant/crude work-around?
Along the same lines, if that were
On the other hand i also think it can be solved with
WSGIScriptAliasMatch ^/wsgi-scripts/([^/]+) /web/wsgi-scripts/$1.wsgi
What would be a more Graham approved solution, for security
reasons :-)
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives#WSGIScriptAliasMatch
2008/12/9 wmiller [EMAIL PROTECTED]:
Is it possible configure mod_wsgi to recognize WSGI application script
files without explicitly declaring the application object within each
script file? If not, is there a elegant/crude work-around?
Along the same lines, if that were possible, it would
22 matches
Mail list logo