I am making a text game, and what I want it to have one console window for showing the game, then another one next to it showing the players stats.

Is this possible ??

Recommended Answers

All 7 Replies

You need to use one of the GUI toolkits for the 2 frames to respond to each other.

What about:

The main program constantly writes to a file the stats of a player, and i write another program to output that stuff

Would it work?

Yes, but are you going to make the user open the second program when they run the game?
You can't open a new console window through your main Python script.

I could have one .exe which opens the other 2..

Would that work? Wouldn't it just open one program in the DOS console, wait until it ends, then run the second?

Nah, I tested it just then, by opening the same python program twice, and 2 terminal windows showed up :)

Another solution - which I don't know if possible - might be having your main program (which opens in the background - no console itself) run two threads, one which opens up the game program and one which opens up the stat program. Then you may be able to have them communicate without the use of a file being perpetually written to and read from the HDD all the time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.