in reply to show a message only during the sleep time

I'm not sure this would work in a browser, but it might, put a \r before your status print statement. This is the "carrige return" character which should just return you to the beginning of the line. \n does a "carrige return" to go back to the beginning of the line as well as a "line feed" to go to the next line (at least in Windoze systems).

This is a trick used in console applications to simulate a continuously updating "status line" without all the fancy schmancy GUI stuff.

Replies are listed 'Best First'.
Re^2: show a message only during the sleep time
by cc (Beadle) on Jul 24, 2005 at 16:20 UTC
    can you pls give some more details, how it should work.

    greetings
    cc
      It (just printing \r) won't work in the context of a browser .. It can, as the poster states, work in the context of a console application, but note that something from curses or console or term will probably be better/more robust (again, just for console apps -- not your browser-context issue).