Browser front-end, python back-end

William wilk-spamout at flibuste.net
Tue Jan 28 14:21:41 EST 2003


"Eric Mattes" <ericmattes at yahoo.com> writes:

> 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.
> 

Using BaseHTTPServer, we can make an .exe with py2exe. You just run it
and open your browser to play !

> 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?

When you don't whant to use Control-C to kill your server, you have to
code the suicide and call it with a hidden page, eventualy on an other
port.

-- 
William Dode - http://flibuste.net




More information about the Python-list mailing list