I'm having a blast coding up my little text-based python game. I'm learning a heck of a lot while doing it.

Now, I want to share it with some friends. I could just have them install Python and send them the files, but I was wondering if I could somehow rig it to work remotely through the Internet. I've got my own little Ubuntu web server chugging away over here. Would it be possible to install Python on the server, put the files there, and access and run them remotely through the Internet?

I'm thinking it should be possible since you'd only have to send the raw input commands and have the server process it, then have the server echo back the print lines.

I'm not asking for step-by-step instructions (though I'm not turning them down), but just wondering if this is possible and worth pursuing.

I'm thinking it should be possible since you'd only have to send the raw input commands and have the server process it, then have the server echo back the print lines.

If this is an http server, then I don't think it would be possible, or at least easy. That's because with mod_python(apache module for python), scripts get executed all at once before they serve the web page. You would have to implement complex state saving algorithms that would soon overshadow your humble text-based game.

My advice? Stick with the text based game, for now. If your friends are running linux like you are, then they probably already have python so no worries. If not, then there are py2exe and py2app scripts that can create executable images of your finished program (but I suggest you only worry about getting it to work when you're done).

Are you saying there would be problems if I was making it accessible through a browser? It wouldn't have to be browser-based. Hrm. How do people that run MUDs do it? Maybe that's a better place to look regarding something like this. I'll see if I can find any Python-based MUDs and find out what they do as far as users accessing and interfacing with the python files.

Yes. I learn the most by blindly running into situations I know next-to-nothing about and trying to figure them out.

Comments
Yes telnet should be easy than http. Go for it.

I've never tried this, nor has it crossed my mind. But it seems like it would be a great idea for sharing simple Python programs with friends without making them install Python first (damn you, Windows!). A HUGE online undertaking using Python is EVE-Online, which is a MMORPG on an incredible scale. Regardless of my current lack on knowledge, I shall start looking up whatever I can find about this, as I'm very interested myself now. I'll post back if I find anything.

This article has been dead for over six months. Start a new discussion instead.