SciRuby / iruby

Official gem repository: Ruby kernel for Jupyter/IPython Notebook
https://github.com/SciRuby/iruby
MIT License
890 stars 27 forks source link

Idea: Display multiple results from a cell #274

Closed ankane closed 4 years ago

ankane commented 4 years ago

In Python notebooks, you can do:

display(1)
display(2)
display(3)

To show:

1
2
3

This is great for things like showing multiple images. It'd be great to be able to do this in Ruby as well.

kojix2 commented 4 years ago

Hi Andrew Kane!

I think IRuby.display is useful for this purpose.

IRuby.display(1)
IRuby.display(2)
IRuby.display(3)

You can display images too.

image

But displaying IO object may not be recommended... https://github.com/SciRuby/iruby/pull/113

ankane commented 4 years ago

Awesome, works great - thanks @kojix2! (saw IRuby::Display.display but missed that one)