Q&A's, tips, howto's
HPW
Posts: 1390 Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:
Post
by HPW » Sun May 09, 2004 7:49 am
Is this code the right method to display progress inside console-mode?
The backspaces bring back the cursor to linestart.
Code: Select all
(define (repstr str num , lst)
(dotimes(x num) (push str lst))
(join lst))
(dolist(linestr inputlist)
..
..
..
(inc 'Loopcount)
(if (=(mod Loopcount 1000)0)
(print (string (repstr "\008" 30)"Processing Line: " Loopcount))
)
)
Hans-Peter
Lutz
Posts: 5289 Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:
Post
by Lutz » Sun May 09, 2004 2:41 pm
On your Solaris box the display code for backspace may or may not be different.
Lutz
HPW
Posts: 1390 Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:
Post
by HPW » Mon May 10, 2004 6:05 am
Yes you are right. It is a bit different, since it does not show every value. It should show everey 1000 line but the terminal is only updated about 19000 lines. But you see the progress and the screen is not full of messages. You see start, progress and end of session.
Hans-Peter