Sign in to follow this  

Effective Python Server

This topic is 3463 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys, I'm starting to work on the networking stuff of my game. I'm using Python, and want to use a TCP approach for the server. I've looked on Google a lot and I keep finding conflicting information. I looked at PyGame, and while some tutorials said it included networking stuff, the documentation says it has none. Can someone point me to a tutorial on writing a server in Python or point me in the right direction? Thanks!

Share this post


Link to post
Share on other sites
Networking support comes with the Python distribution; you don't need additional libraries unless you don't like the interface in the Python library. You might want to look at the socket and SocketServer standard Python modules.

Share this post


Link to post
Share on other sites
Well, I was looking more for a guide/tutorial. I've looked over those modules, but I'm confused by them and don't really understand them that well.

Share this post


Link to post
Share on other sites
Hi,

I second the Twisted advise.
Never really used it, but I've only heard good things from it, and I did look in the code some time ago, and it was rather well written...

Share this post


Link to post
Share on other sites
Quote:
Original post by samoz
Well, I was looking more for a guide/tutorial.


It's not clear whether your problem is with Python, with networking, or both. It's also unclear exactly what sort of server you want - what will it be serving, to who, and how often?

Typically networking in Python is identical to networking in C, so you'll find very little telling you how to do it in Python. On the other hand, if you use something like Twisted, it's quite different, but reasonably well documented.

Share this post


Link to post
Share on other sites

This topic is 3463 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this