Scroll windows for code in iPython (Jupyter) Notebooks?

早过忘川 提交于 2019-12-12 04:06:05

问题


Is there a way to display large blocks of code in an iPython notebook in a scroll window?

I have a notebook where the focus is on graphical output of the code and comments in the markdown text. I want to be able to execute the code in the notebook and have it available to the reader, but many of the code blocks are very lengthy. A scroll window would make a notebook much cleaner and more concise, allowing readers the option of moving past large code blocks.


回答1:


The best way so far is to use the hide_code package (https://pypi.python.org/pypi/hide_code/0.1.5). To install:

$ pip install hide_code

This will enable you to hide or display the content of each individual cell. It is great !

Though I hope the vertical scroll bar for input cells will be available soon.



来源:https://stackoverflow.com/questions/35537789/scroll-windows-for-code-in-ipython-jupyter-notebooks

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!