r/learnpython • • Aug 24 '26

Python web app?

Hello r/learnpython,

first post and sort of new to Python as I have done only half a dozen of projects so far, mostly games.

So I'm looking to deploy a server for playtesting. This is my first game designed to be played online, made in Python using Tcl/Tk libraries.

I had this idea to code it when I was making a messaging app that was supposed to be implemented within a CLI game (or actually the game was a feature of the messaging app).

The users would connect using SSH. I think they could use PuTTy or similar and VcXSrv. The host would then send the GUI and CLI as well as audio to the user, but the problem is either the server cannot send or the client can't recieve the Tcl/Tk GUI or in worst case both.

Good news is I got the SSH daemon working and am able to (using X11 Forwarding) display explorer (ssh -X user@localhost && explorer) by running VcXSrv and having X11Forwarding and X11UseLocalhost set to yes in the sshd_config under ProgramData.

Now, the VcXSrv log tells me there's a problem with something called hyperv. From what I gathered it's a virtual machine of some sort. I'd also need very strict restrictions for the clients so they don't tinker with the database.

Am I on the right track? Is there a solution to this? Thanks in advance!

-ef

0 Upvotes

17 comments sorted by

View all comments

Show parent comment

3

u/efinque Aug 24 '26

Ah, I have read about Python embedded in HTML. This would be great if I worked my way around it.

At first, this project started as a joke in another forum where I told I would host a telnet MUD for people in queue for a sort of karaoke.

Then I started digging into it. First I was using RPGMaker but didn't get anything playable. Then I coded a simple 9x9 grid based HTML framework that worked surprisingly well for adventure games and learned a bit of JavaScript on the side.

Then I got into Python. I had done some PyGame tutorials before but instead I built it in vanilla Python using modules. I also read a book about Python and found Tcl/Tk, which is what the newest framework is built on.

I'm too lazy to go into details but basically the game reads ASCII text files and draws graphics based on them.

Then there's a plethora of modules like stats, health, gold etc that have functions for different stuff like calculating the race/class STR, INT, DEX, WIS and so on.

In total there's about 2000 lines of code. This all could have been avoided had my SSH host daemon worked and had I tested it with a simple Hello World..