Hugo Francisco González Robledo wrote:
> Is there any way to run python not as CGI or Fast CGI???
Both. Actually, you can even run Cherokee with SCGI.
> now we are using this configuration, to run like php
>
> Extension py {
> Handler phpcgi {
> Interpreter /ruta/a/python
> }
> }
>
> is that ok, or there is any problem with that?
> it works well on windows, any comments ?
Doesn't make sense at all.
If you want to use Python CGIs, you should use something like this:
Extension py {
Handler cgi
}
actually, I wouldn't use it because of the performance penalty of
using CGI and a quite big interpreter like the Python one. I would
rather use SCGI:
Directory /myapp {
Handler scgi {
Server localhost:8181
}
}
and then, code a SCGI application server that listens the local port
8181 for incoming SCGI requests. Using the "scgi" python module
it's quite easy actually. You can even use this code fragment as a
skeleton:
===========
from scgi.scgi_server import *
class IndexHandler (SCGIHandler):
def handle_connection (self, socket):
s_out = socket.makefile ('w')
s_in = socket.makefile("r")
# Here goes your stuff
server = SCGIServer(IndexHandler, port=8181)
server.serve()
===========
Good luck!
--
Greetings, alo.
_______________________________________________
Cherokee mailing list
[email protected]
http://cherokee-project.com/cgi-bin/mailman/listinfo/cherokee