function printing progress to terminal while running
Ben Abbott
bpabbott at mac.com
Sat Mar 22 11:27:55 CDT 2008
On Mar 22, 2008, at 11:25 AM, Malte Köster wrote:
> Hi there,
> I have a function that takes quite a while to execute, so I would
> like it to give some progress indication.
> I tried to use printf to print the actual status to the terminal.
> However this does not work, since all the printing is done only after
> the whole function is executed.
> Is there a way to print something to the terminal _while_ the
> function is executed?
>
> cheers,
> malte
Sounds like your process indicator is being help up by the pager.
Try "more off" before running your function. It that fixes the problem
If so, experiment with the commands below. It should be possible to
get the effect you're looking for.
page_output_immediately
fflush
drawnow
Ben
More information about the Help-octave
mailing list