Browser front-end, python back-end
remi at cherrypy.org
Wed Jan 29 09:21:05 CET 2003
> Sorry, I should have been more specific about the intent of this program.
> am intending to distribute the program in a form which does not require an
> internet connection. I wanted a python program to act as a server so that
> can receive requests from a browser pointing to localhost.
> The program is a turn-based game, so it is suitable for web browser
> implementation. I'm just wondering if its feasable to have the whole app
> (server and all) in one package.
> My worries about using BaseHTTPServer come from the fact that when I run
> 'serve_forever()', I need to use the task manager to kill the program. Is
> there some way around that?
I think CherryPy (http://www.cherrypy.org) would fit your needs.
Do develop a web app with CherryPy, you write source files, compile them
with CherryPy and CherryPy generates a single executable containing the
"server and all" :-).
About your problem of having to "use the task manager to kill the program":
you're probably developing on Windows. In this case, hitting "control-C"
will not stop the program right away because it is stuck on a
"socket.accept()" call. In order to stop it, you have to hit
More information about the Python-list