A python server

Irmen de Jong irmen at -NOSPAM-REMOVE-THIS-xs4all.nl
Mon Apr 14 19:57:22 CEST 2003


dansan wrote:
> Hello all!
> 
> I have read and re-read the PY Sockets HOWTO, and I guess I'm still in
> the dark about how to do some stuff.
> 
> I'm trying to write a little server that will allow connections via
> telnet-like clients to play a board game.  The server would wait for a
> wile for connections, and at some point, it would read a command from
> the CLI on the server that says <startTournament>.  The server would
> then generate a tournament schedule and start the games.  Since these
> are turn-based games, the server would have to give each player its
> <go> command (and start a timer) in the proper sequence.
> 
[...]

Is it mandatory to support telnet clients?
If not, may I suggest you take a look at Pyro (http://pyro.sourceforge.net).

If you're able to write your game system and clients as a regular
python application, you can make it a distributed application with
a game server hub using Pyro in no time.

Pyro comes with a lot of examples (including a chat box),
perhaps you find something you need to get you going.

Bottom line: if you're already having trouble with the low-leve guts
of the system (the communication/socket code) I strongly suggest
that you drop that and use a higher level library or framework first.

--Irmen





More information about the Python-list mailing list