Is there a plan to make the macro print!
work on notebook?
#349
Replies: 1 comment
-
Thanks for volunteering to look a this! I think the first thing we need to do is some design work. I'm not 100% sure how it should work, but we can discuss options and figure it out. If the goal is progress bars in a notebook, then one alternative to making For making There are a number of crates on crates.io that integrate with evcxr for this kind of output. So I feel that it's important to maintain backward compatibility with this way of outputting HTML, even if it's perhaps inconvenient. One option, would be to allow outputting of multiple content blocks. So for example, right now the following doesn't really work as you'd want it to: for i in 0..10 {
println!("EVCXR_BEGIN_CONTENT text/html\n<p>Foo {i}</p>\nEVCXR_END_CONTENT");
std::thread::sleep(std::time::Duration::from_millis(500));
} Evcxr currently collects these up and each At present, code can output both a text/html block and a text/plain block. The jupyter notebook will show only the HTML and the REPL will show only the text/plain. In order to preserve this, we'd probably need to have the notebook suppress output of text/plain if it has seen text/html output. We could then extend the block format to allow replacement of previous output. One possibility would be to allow an optional modifier after the end marker. e.g. For actually just making |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As mentioned on #303 and this, a progress bar is really important for someone doing data analysis on a notebook. If the reason why this feature is not implmented yet is lack of time, you can give me some guidances and I will give it a try.
Beta Was this translation helpful? Give feedback.
All reactions