On 10/22/17 06:34, T M Smith wrote:
>> I've implemented a version of Curses for Java, using the information and
>> API description in "Programming with Curses" (O'Reilly) partly because I
>> could and partly to convince myself that I understood Curses well enough
>> to do it.
> I am altering a python program and just wish to display readings of
> temperature etc. in the same place on screen after each update.
>
I posted a sample C program. here's a sample python program using the
ANSI sequence to "home the cursor":
import time
import sys
for xx in range(0,500) :
print "here I am ", xx, "\x1b[1G",
sys.stdout.flush()
time.sleep(0.1)
(note ',' at end of print, which doesn't do a line feed - also need the
'flush' to make sure it outputs immediately)
enjoy
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|