Is it possible to print with a carriage return but not a new line? I'd like to keep track of the progress of a long calculation without filling the screen with prints.
1 Answer
$\begingroup$
$\endgroup$
Simplest for me is to use a ProgressIndicator in the interactive notebook: ProgressIndicator[Dynamic[VariableForMapCurrentPosition], {1, LastMapIndex}]
Then have your Map function update 'VariableForMapCurrentPosition' . Two other comments:
- As @Szabolcs wrote above, there is more information in previous similar questions.
- This doesn't work well with Parallel. You can simply SetShared your position variable, but at least in my case it slows things down -- more than double the time. This post has more on the topic: Monitor doesn't work with ParallelTable
Monitor
instead. $\endgroup$PrintTemporary
will still fill up the screen though, even if the cells are removed when the calculation is done. $\endgroup$