[Tutor] carriage return on windows

Alan Gauld alan.gauld at freenet.co.uk
Tue Feb 1 05:42:12 CET 2005

> I played around with this output issue and I love the way it works.
> Now, how do you do this in *nix? I tried the same approach and I get
> blank line for 5 seconds (or whatever number of cycles you have on
> example) and the a final line with the last value of the iterable.

On Unix it is easiest to use the curses library.
There are so many different terminals in use on Unix that
no single set of control codes can be guaranteed to work.
Curses provides an abstract terminal that you can control
by positioning the cursor at x,y coordinates etc.

Alan G
Author of the Learn to Program web tutor

More information about the Tutor mailing list