python+windows/linux -> write stdout text to always on top text?

F

flamesrock

Hi,

I'm curious if theres a way in python to write stdout text to the
screen (ie top right) the way they do in some FPS games, so that its
always on top, in an invisible window of some set dimensions. No matter
what program is on top.

Is there a way to make it cross platform?

I've looked but nothing seems to turn up on the subject.

-thanks in advance.
 
S

Swaroop C H

I'm curious if theres a way in python to write stdout text to the
screen (ie top right) the way they do in some FPS games, so that its
always on top, in an invisible window of some set dimensions. No matter
what program is on top.

Why would you want to do that ?
 
F

flamesrock

I'm writing a multiplayer component to an existing closed source game,
and I'd like users to be able to see whats going on in the chat while
playing the game.

Is it possible?
 
S

Swaroop C H

I'm writing a multiplayer component to an existing closed source game,
and I'd like users to be able to see whats going on in the chat while
playing the game.
Is it possible?

I do not have much knowledge in this area but your query is regarding
the abilities of the game engine itself and not much to do with
Python. One suggestion is to look up any documentation of that game
engine's for this capability. Another suggestion is to look at how
Doom 2 or some other open source game engines achieve the same.


HTH,
 
P

Philippe C. Martin

I understand you wish to reroute stdout to some object than can write to a
window - correct ?

If so, this is what I do with tkinter ....


class SC_Log_Stdout:
#*******************************************************************************
def __init__(self, p_log_text):
self.__m_log_text = p_log_text #graphics object - would be your game
engine I guess
#*******************************************************************************
def write(self,p_string):
try:


except:
pass

..
..
..
..
..
..
sys.stdout = SC_Log_Stdout(.....) #reroute stdout
..
..
..
#launch your game
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top