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

Discussion in 'Python' started by flamesrock, May 2, 2005.

  1. flamesrock

    flamesrock Guest

    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.
    flamesrock, May 2, 2005
    #1
    1. Advertising

  2. flamesrock

    Swaroop C H Guest

    On 2 May 2005 13:14:02 -0700, flamesrock <> wrote:
    > 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 ?

    --
    Swaroop C H
    Blog: http://www.swaroopch.info
    Book: http://www.byteofpython.info
    Swaroop C H, May 3, 2005
    #2
    1. Advertising

  3. flamesrock

    flamesrock Guest

    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?
    flamesrock, May 3, 2005
    #3
  4. flamesrock

    Swaroop C H Guest

    On 3 May 2005 09:41:37 -0700, flamesrock <> wrote:
    > 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,
    --
    Swaroop C H
    Blog: http://www.swaroopch.info
    Book: http://www.byteofpython.info
    Swaroop C H, May 3, 2005
    #4
  5. flamesrock

    flamesrock Guest

    hmm... I guess its not possible as I feared :(

    thanks anyways
    flamesrock, May 4, 2005
    #5
  6. 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









    flamesrock wrote:

    > 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.
    Philippe C. Martin, May 4, 2005
    #6
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. AJ
    Replies:
    2
    Views:
    1,980
  2. chuck
    Replies:
    4
    Views:
    846
    chuck
    Jul 18, 2005
  3. Elad
    Replies:
    0
    Views:
    401
  4. John Doe
    Replies:
    0
    Views:
    225
    John Doe
    May 29, 2009
  5. Patrick Bennett
    Replies:
    7
    Views:
    99
    Ara.T.Howard
    Feb 2, 2004
Loading...

Share This Page