Hi fellow Sagers,

I'm looking for some natural way to replace the output for the current
notebook cell during its computation. But before filing an enhancement
request, I would like to make sure I'm not overlooking the obvious.

My motivation is to display progress information during a long running
calculation. If I use print or html(), everything I write is appended to
the output. Even after the calculation has finished, my cell is occupied
with the progress messages which are no longer necessary.

A quick look at the notebook sources revealed that
check_for_cell_update() is repeatedly polling for the contents of the
cell output and that set_output_text() can be used to change it. But I
would need the current cell object to use this function, which is as far
as I know unaccessible from the notebook itself.

Note that I can work around the problem using some client side scripting
hack as demonstrated in the attached proof-of-concept notebook. But I
don't like to depend on undocumented features and there must be some
nicer way to tackle this.

Thank you,
Tamas

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Attachment: progress.sws
Description: Binary data

Reply via email to