Browser front-end, python back-end

Remi Delon remi at cherrypy.org
Wed Jan 29 03:21:05 EST 2003


> Sorry, I should have been more specific about the intent of this program.
I
> 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
it
> 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?
>
> Thanks!
> -E

Hi Eric,
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
"control-break".

Regards.

Remi.








More information about the Python-list mailing list